Open lwenxu opened 3 years ago
after reading the code , i modified code to this and it works
public static JafuApplication app = Jafu.webApplication(ioc ->
ioc
.beans(beanDefinition ->
beanDefinition.bean(SampleHandler.class)
.bean(SampleService.class)
.bean(Sample.class))
.logging(loggingDsl -> loggingDsl.level(LogLevel.DEBUG))
.enable(WebMvcServerDsl.webMvc(dsl ->
dsl.port(dsl.profiles().contains("test") ? 8181 : 8080)
.router(router -> {
SampleHandler handler = dsl.ref(SampleHandler.class);
router.GET("/sayHello", handler::hello);
})
.converters(c ->
c.string().jackson()
)
))
);
I strongly recommend that change the demo code on readme to this
when i use it in springboot proj , and use sample case:
i get that result , i can't compile that , and i want to call
s.initialize()
but i can't get bean context any more