New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JsonMappingException when return response; #36
Comments
You need to configure See KtormConfiguration (line 25) class in ktorm-example-spring-boot. |
@vincentlauvlwj |
print the beans
my project: example: |
检查一下你项目中是否存在自己定义的 |
你可以试一下把这整个类删掉看看 |
@vincentlauvlwj 去掉@configuration后可以正常序列化了. |
自己添加一个 converter 也就两三行代码: override fun configureMessageConverters(converters: MutableList<HttpMessageConverter<*>>) {
super.configureMessageConverters(converters)
converters += MappingJackson2HttpMessageConverter().apply {
objectMapper = ObjectMapper().registerModule(KtormModule())
}
} |
可以了,多谢啦. |
I modifier a new project from ktorm-example-spring-boot ,it works well.
but then I try to integration ktorm to my old project.
just simple http api like this:
the list can query success from db,but throw ex after return
This is my maven config(other libs is omit ):
kt version is 1.3.41
the error log
The text was updated successfully, but these errors were encountered: