빈 디비에서 최소 실행할 때 문제 수정
This commit is contained in:
@ -476,6 +476,14 @@ func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMu
|
|||||||
only.prepare(mg)
|
only.prepare(mg)
|
||||||
|
|
||||||
atomic.StorePointer(&mg.serviceptr, unsafe.Pointer(only))
|
atomic.StorePointer(&mg.serviceptr, unsafe.Pointer(only))
|
||||||
|
} else {
|
||||||
|
empty := serviceDescription{
|
||||||
|
ServiceDescriptionSummary: ServiceDescriptionSummary{
|
||||||
|
Id: primitive.NewObjectID(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
empty.prepare(mg)
|
||||||
|
atomic.StorePointer(&mg.serviceptr, unsafe.Pointer(&empty))
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Println("Service is registered :", mg.service().ServiceCode)
|
logger.Println("Service is registered :", mg.service().ServiceCode)
|
||||||
|
|||||||
Reference in New Issue
Block a user