Custom ObjectMapper ignored after migration to Spring Boot 2
up vote
0
down vote
favorite
Before migrating to Spring Boot 2.1.0
I had the following ObjectMapper
configured by extending WebMvcConfigurerAdapter
working as expected.
@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter {
private static final ObjectMapper objectMapper = buildObjectMapper();
private static ObjectMapper buildObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.configOverride(LocalDate.class).
setFormat(JsonFormat.Value.forPattern("yyyy-MM-dd"));
mapper.registerModule(new JavaTimeModule());
return mapper;
}
public static ObjectMapper getObjectMapper() {
return objectMapper;
}
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
converters.add(new MappingJackson2HttpMessageConverter(objectMapper)); // JSON converter
}
}
However after migrating I can see that setting PropertyNamingStrategy seems to have no effect, my application still expects the format of JSON
fields to match the default (e.g. requires "bloodType" instead of "blood-type" as expected).
I don't think that there is any problem with the mapper itself as I use the static getObjectMapper
to share the same instance with REST Assured
via RestAssuredConfig
and seems to be still behaving as expected, if I update my custom mapper to the default behavior (commenting setPropertyNamingStrategy
) everything seem to work as expected.
EDIT 1
In fact my whole mapper is being ignored, I tried to change the LocalDate
format and it also made no difference. Updating the title to reflect the problem better.
java spring-mvc spring-boot jackson
add a comment |
up vote
0
down vote
favorite
Before migrating to Spring Boot 2.1.0
I had the following ObjectMapper
configured by extending WebMvcConfigurerAdapter
working as expected.
@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter {
private static final ObjectMapper objectMapper = buildObjectMapper();
private static ObjectMapper buildObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.configOverride(LocalDate.class).
setFormat(JsonFormat.Value.forPattern("yyyy-MM-dd"));
mapper.registerModule(new JavaTimeModule());
return mapper;
}
public static ObjectMapper getObjectMapper() {
return objectMapper;
}
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
converters.add(new MappingJackson2HttpMessageConverter(objectMapper)); // JSON converter
}
}
However after migrating I can see that setting PropertyNamingStrategy seems to have no effect, my application still expects the format of JSON
fields to match the default (e.g. requires "bloodType" instead of "blood-type" as expected).
I don't think that there is any problem with the mapper itself as I use the static getObjectMapper
to share the same instance with REST Assured
via RestAssuredConfig
and seems to be still behaving as expected, if I update my custom mapper to the default behavior (commenting setPropertyNamingStrategy
) everything seem to work as expected.
EDIT 1
In fact my whole mapper is being ignored, I tried to change the LocalDate
format and it also made no difference. Updating the title to reflect the problem better.
java spring-mvc spring-boot jackson
I think your mapper propertyNamingStrategy is not get by spring boot application its getting from hibernate propertyNamingStrategy you should try this. spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
– Raheela Aslam
Nov 19 at 6:28
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Before migrating to Spring Boot 2.1.0
I had the following ObjectMapper
configured by extending WebMvcConfigurerAdapter
working as expected.
@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter {
private static final ObjectMapper objectMapper = buildObjectMapper();
private static ObjectMapper buildObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.configOverride(LocalDate.class).
setFormat(JsonFormat.Value.forPattern("yyyy-MM-dd"));
mapper.registerModule(new JavaTimeModule());
return mapper;
}
public static ObjectMapper getObjectMapper() {
return objectMapper;
}
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
converters.add(new MappingJackson2HttpMessageConverter(objectMapper)); // JSON converter
}
}
However after migrating I can see that setting PropertyNamingStrategy seems to have no effect, my application still expects the format of JSON
fields to match the default (e.g. requires "bloodType" instead of "blood-type" as expected).
I don't think that there is any problem with the mapper itself as I use the static getObjectMapper
to share the same instance with REST Assured
via RestAssuredConfig
and seems to be still behaving as expected, if I update my custom mapper to the default behavior (commenting setPropertyNamingStrategy
) everything seem to work as expected.
EDIT 1
In fact my whole mapper is being ignored, I tried to change the LocalDate
format and it also made no difference. Updating the title to reflect the problem better.
java spring-mvc spring-boot jackson
Before migrating to Spring Boot 2.1.0
I had the following ObjectMapper
configured by extending WebMvcConfigurerAdapter
working as expected.
@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter {
private static final ObjectMapper objectMapper = buildObjectMapper();
private static ObjectMapper buildObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.configOverride(LocalDate.class).
setFormat(JsonFormat.Value.forPattern("yyyy-MM-dd"));
mapper.registerModule(new JavaTimeModule());
return mapper;
}
public static ObjectMapper getObjectMapper() {
return objectMapper;
}
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
converters.add(new MappingJackson2HttpMessageConverter(objectMapper)); // JSON converter
}
}
However after migrating I can see that setting PropertyNamingStrategy seems to have no effect, my application still expects the format of JSON
fields to match the default (e.g. requires "bloodType" instead of "blood-type" as expected).
I don't think that there is any problem with the mapper itself as I use the static getObjectMapper
to share the same instance with REST Assured
via RestAssuredConfig
and seems to be still behaving as expected, if I update my custom mapper to the default behavior (commenting setPropertyNamingStrategy
) everything seem to work as expected.
EDIT 1
In fact my whole mapper is being ignored, I tried to change the LocalDate
format and it also made no difference. Updating the title to reflect the problem better.
java spring-mvc spring-boot jackson
java spring-mvc spring-boot jackson
edited Nov 19 at 14:54
asked Nov 19 at 6:12
Táizel Girão Martins
15
15
I think your mapper propertyNamingStrategy is not get by spring boot application its getting from hibernate propertyNamingStrategy you should try this. spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
– Raheela Aslam
Nov 19 at 6:28
add a comment |
I think your mapper propertyNamingStrategy is not get by spring boot application its getting from hibernate propertyNamingStrategy you should try this. spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
– Raheela Aslam
Nov 19 at 6:28
I think your mapper propertyNamingStrategy is not get by spring boot application its getting from hibernate propertyNamingStrategy you should try this. spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
– Raheela Aslam
Nov 19 at 6:28
I think your mapper propertyNamingStrategy is not get by spring boot application its getting from hibernate propertyNamingStrategy you should try this. spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
– Raheela Aslam
Nov 19 at 6:28
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
I think your mapper propertyNamingStrategy
is not get by spring boot application
its getting from hibernate propertyNamingStrategy
you should try this.
spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy
Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
OR:
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
for (HttpMessageConverter<?> converter : converters) {
if (converter instanceof MappingJackson2HttpMessageConverter) {
MappingJackson2HttpMessageConverter jsonMessageConverter = (MappingJackson2HttpMessageConverter) converter;
ObjectMapper objectMapper = jsonMessageConverter.getObjectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
break;
}
}
}
The problem can be seem on the JSON request parsed, at the REST controller the parsed object misses the fields that doesn't match the default format. Hibernate shouldn't be involved at this point, but maybe there is some Spring magic in place, in any case do you know how to set this property to have the KEBAB_CASE strategy so I could test your suggestion? For me this property should be used for something different, that's why I'm confused.
– Táizel Girão Martins
Nov 19 at 7:12
You can try my suggestion and provide your feed back. I think it will work .
– Raheela Aslam
Nov 19 at 7:36
I've tried your second suggestion, I replacedconfigureMessageConverters
with yourextendMessageConverters
and still the same issue, however while doing that I decided to try to change myLocalDate
format to see if it would have any difference and that this is also being ignored. I think it's a more general configuration issue as it seem that my customObjectMapper
is completely ignored. I'm looking into the latest documentation to see what I'm doing wrong, I haven't found a big difference yet on theSpring Boot 2
documentation so far for those points.
– Táizel Girão Martins
Nov 20 at 10:13
add a comment |
up vote
0
down vote
accepted
My problem was solved by adding the @EnableWebMvc
annotation, which according to the documentation takes complete control of Spring MVC which is not what I wanted originally but at least makes sense. It's not clear for me why it was working before my migration to Spring Boot 2
and why extending the the Spring MVC behavior doesn't work anymore.
I would be grateful for one answer that would add a good explanation for this, and ideally would avoid the full override by @EnableWebMvc
.
EDIT 1
Normally you would add @EnableWebMvc for a Spring MVC app, but Spring
Boot adds it automatically when it sees spring-webmvc on the
classpath.
Reference: https://spring.io/guides/gs/serving-web-content/
Unfortunately it's not a complete explanation for me as I can see spring-webmvc:5.1.2.RELEASE
in my classpath.
I will mark this as answered considering that using @EnableWebMvc
or configuring one @Bean
for ObjectMapper
are working as expected.
I will would still like to know why the @EnableWebMvc
was needed, considering that according to the documentation it shouldn't.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I think your mapper propertyNamingStrategy
is not get by spring boot application
its getting from hibernate propertyNamingStrategy
you should try this.
spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy
Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
OR:
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
for (HttpMessageConverter<?> converter : converters) {
if (converter instanceof MappingJackson2HttpMessageConverter) {
MappingJackson2HttpMessageConverter jsonMessageConverter = (MappingJackson2HttpMessageConverter) converter;
ObjectMapper objectMapper = jsonMessageConverter.getObjectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
break;
}
}
}
The problem can be seem on the JSON request parsed, at the REST controller the parsed object misses the fields that doesn't match the default format. Hibernate shouldn't be involved at this point, but maybe there is some Spring magic in place, in any case do you know how to set this property to have the KEBAB_CASE strategy so I could test your suggestion? For me this property should be used for something different, that's why I'm confused.
– Táizel Girão Martins
Nov 19 at 7:12
You can try my suggestion and provide your feed back. I think it will work .
– Raheela Aslam
Nov 19 at 7:36
I've tried your second suggestion, I replacedconfigureMessageConverters
with yourextendMessageConverters
and still the same issue, however while doing that I decided to try to change myLocalDate
format to see if it would have any difference and that this is also being ignored. I think it's a more general configuration issue as it seem that my customObjectMapper
is completely ignored. I'm looking into the latest documentation to see what I'm doing wrong, I haven't found a big difference yet on theSpring Boot 2
documentation so far for those points.
– Táizel Girão Martins
Nov 20 at 10:13
add a comment |
up vote
1
down vote
I think your mapper propertyNamingStrategy
is not get by spring boot application
its getting from hibernate propertyNamingStrategy
you should try this.
spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy
Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
OR:
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
for (HttpMessageConverter<?> converter : converters) {
if (converter instanceof MappingJackson2HttpMessageConverter) {
MappingJackson2HttpMessageConverter jsonMessageConverter = (MappingJackson2HttpMessageConverter) converter;
ObjectMapper objectMapper = jsonMessageConverter.getObjectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
break;
}
}
}
The problem can be seem on the JSON request parsed, at the REST controller the parsed object misses the fields that doesn't match the default format. Hibernate shouldn't be involved at this point, but maybe there is some Spring magic in place, in any case do you know how to set this property to have the KEBAB_CASE strategy so I could test your suggestion? For me this property should be used for something different, that's why I'm confused.
– Táizel Girão Martins
Nov 19 at 7:12
You can try my suggestion and provide your feed back. I think it will work .
– Raheela Aslam
Nov 19 at 7:36
I've tried your second suggestion, I replacedconfigureMessageConverters
with yourextendMessageConverters
and still the same issue, however while doing that I decided to try to change myLocalDate
format to see if it would have any difference and that this is also being ignored. I think it's a more general configuration issue as it seem that my customObjectMapper
is completely ignored. I'm looking into the latest documentation to see what I'm doing wrong, I haven't found a big difference yet on theSpring Boot 2
documentation so far for those points.
– Táizel Girão Martins
Nov 20 at 10:13
add a comment |
up vote
1
down vote
up vote
1
down vote
I think your mapper propertyNamingStrategy
is not get by spring boot application
its getting from hibernate propertyNamingStrategy
you should try this.
spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy
Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
OR:
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
for (HttpMessageConverter<?> converter : converters) {
if (converter instanceof MappingJackson2HttpMessageConverter) {
MappingJackson2HttpMessageConverter jsonMessageConverter = (MappingJackson2HttpMessageConverter) converter;
ObjectMapper objectMapper = jsonMessageConverter.getObjectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
break;
}
}
}
I think your mapper propertyNamingStrategy
is not get by spring boot application
its getting from hibernate propertyNamingStrategy
you should try this.
spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy
Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
OR:
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
for (HttpMessageConverter<?> converter : converters) {
if (converter instanceof MappingJackson2HttpMessageConverter) {
MappingJackson2HttpMessageConverter jsonMessageConverter = (MappingJackson2HttpMessageConverter) converter;
ObjectMapper objectMapper = jsonMessageConverter.getObjectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
break;
}
}
}
edited Nov 19 at 8:13
answered Nov 19 at 6:44
Raheela Aslam
37010
37010
The problem can be seem on the JSON request parsed, at the REST controller the parsed object misses the fields that doesn't match the default format. Hibernate shouldn't be involved at this point, but maybe there is some Spring magic in place, in any case do you know how to set this property to have the KEBAB_CASE strategy so I could test your suggestion? For me this property should be used for something different, that's why I'm confused.
– Táizel Girão Martins
Nov 19 at 7:12
You can try my suggestion and provide your feed back. I think it will work .
– Raheela Aslam
Nov 19 at 7:36
I've tried your second suggestion, I replacedconfigureMessageConverters
with yourextendMessageConverters
and still the same issue, however while doing that I decided to try to change myLocalDate
format to see if it would have any difference and that this is also being ignored. I think it's a more general configuration issue as it seem that my customObjectMapper
is completely ignored. I'm looking into the latest documentation to see what I'm doing wrong, I haven't found a big difference yet on theSpring Boot 2
documentation so far for those points.
– Táizel Girão Martins
Nov 20 at 10:13
add a comment |
The problem can be seem on the JSON request parsed, at the REST controller the parsed object misses the fields that doesn't match the default format. Hibernate shouldn't be involved at this point, but maybe there is some Spring magic in place, in any case do you know how to set this property to have the KEBAB_CASE strategy so I could test your suggestion? For me this property should be used for something different, that's why I'm confused.
– Táizel Girão Martins
Nov 19 at 7:12
You can try my suggestion and provide your feed back. I think it will work .
– Raheela Aslam
Nov 19 at 7:36
I've tried your second suggestion, I replacedconfigureMessageConverters
with yourextendMessageConverters
and still the same issue, however while doing that I decided to try to change myLocalDate
format to see if it would have any difference and that this is also being ignored. I think it's a more general configuration issue as it seem that my customObjectMapper
is completely ignored. I'm looking into the latest documentation to see what I'm doing wrong, I haven't found a big difference yet on theSpring Boot 2
documentation so far for those points.
– Táizel Girão Martins
Nov 20 at 10:13
The problem can be seem on the JSON request parsed, at the REST controller the parsed object misses the fields that doesn't match the default format. Hibernate shouldn't be involved at this point, but maybe there is some Spring magic in place, in any case do you know how to set this property to have the KEBAB_CASE strategy so I could test your suggestion? For me this property should be used for something different, that's why I'm confused.
– Táizel Girão Martins
Nov 19 at 7:12
The problem can be seem on the JSON request parsed, at the REST controller the parsed object misses the fields that doesn't match the default format. Hibernate shouldn't be involved at this point, but maybe there is some Spring magic in place, in any case do you know how to set this property to have the KEBAB_CASE strategy so I could test your suggestion? For me this property should be used for something different, that's why I'm confused.
– Táizel Girão Martins
Nov 19 at 7:12
You can try my suggestion and provide your feed back. I think it will work .
– Raheela Aslam
Nov 19 at 7:36
You can try my suggestion and provide your feed back. I think it will work .
– Raheela Aslam
Nov 19 at 7:36
I've tried your second suggestion, I replaced
configureMessageConverters
with your extendMessageConverters
and still the same issue, however while doing that I decided to try to change my LocalDate
format to see if it would have any difference and that this is also being ignored. I think it's a more general configuration issue as it seem that my custom ObjectMapper
is completely ignored. I'm looking into the latest documentation to see what I'm doing wrong, I haven't found a big difference yet on the Spring Boot 2
documentation so far for those points.– Táizel Girão Martins
Nov 20 at 10:13
I've tried your second suggestion, I replaced
configureMessageConverters
with your extendMessageConverters
and still the same issue, however while doing that I decided to try to change my LocalDate
format to see if it would have any difference and that this is also being ignored. I think it's a more general configuration issue as it seem that my custom ObjectMapper
is completely ignored. I'm looking into the latest documentation to see what I'm doing wrong, I haven't found a big difference yet on the Spring Boot 2
documentation so far for those points.– Táizel Girão Martins
Nov 20 at 10:13
add a comment |
up vote
0
down vote
accepted
My problem was solved by adding the @EnableWebMvc
annotation, which according to the documentation takes complete control of Spring MVC which is not what I wanted originally but at least makes sense. It's not clear for me why it was working before my migration to Spring Boot 2
and why extending the the Spring MVC behavior doesn't work anymore.
I would be grateful for one answer that would add a good explanation for this, and ideally would avoid the full override by @EnableWebMvc
.
EDIT 1
Normally you would add @EnableWebMvc for a Spring MVC app, but Spring
Boot adds it automatically when it sees spring-webmvc on the
classpath.
Reference: https://spring.io/guides/gs/serving-web-content/
Unfortunately it's not a complete explanation for me as I can see spring-webmvc:5.1.2.RELEASE
in my classpath.
I will mark this as answered considering that using @EnableWebMvc
or configuring one @Bean
for ObjectMapper
are working as expected.
I will would still like to know why the @EnableWebMvc
was needed, considering that according to the documentation it shouldn't.
add a comment |
up vote
0
down vote
accepted
My problem was solved by adding the @EnableWebMvc
annotation, which according to the documentation takes complete control of Spring MVC which is not what I wanted originally but at least makes sense. It's not clear for me why it was working before my migration to Spring Boot 2
and why extending the the Spring MVC behavior doesn't work anymore.
I would be grateful for one answer that would add a good explanation for this, and ideally would avoid the full override by @EnableWebMvc
.
EDIT 1
Normally you would add @EnableWebMvc for a Spring MVC app, but Spring
Boot adds it automatically when it sees spring-webmvc on the
classpath.
Reference: https://spring.io/guides/gs/serving-web-content/
Unfortunately it's not a complete explanation for me as I can see spring-webmvc:5.1.2.RELEASE
in my classpath.
I will mark this as answered considering that using @EnableWebMvc
or configuring one @Bean
for ObjectMapper
are working as expected.
I will would still like to know why the @EnableWebMvc
was needed, considering that according to the documentation it shouldn't.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
My problem was solved by adding the @EnableWebMvc
annotation, which according to the documentation takes complete control of Spring MVC which is not what I wanted originally but at least makes sense. It's not clear for me why it was working before my migration to Spring Boot 2
and why extending the the Spring MVC behavior doesn't work anymore.
I would be grateful for one answer that would add a good explanation for this, and ideally would avoid the full override by @EnableWebMvc
.
EDIT 1
Normally you would add @EnableWebMvc for a Spring MVC app, but Spring
Boot adds it automatically when it sees spring-webmvc on the
classpath.
Reference: https://spring.io/guides/gs/serving-web-content/
Unfortunately it's not a complete explanation for me as I can see spring-webmvc:5.1.2.RELEASE
in my classpath.
I will mark this as answered considering that using @EnableWebMvc
or configuring one @Bean
for ObjectMapper
are working as expected.
I will would still like to know why the @EnableWebMvc
was needed, considering that according to the documentation it shouldn't.
My problem was solved by adding the @EnableWebMvc
annotation, which according to the documentation takes complete control of Spring MVC which is not what I wanted originally but at least makes sense. It's not clear for me why it was working before my migration to Spring Boot 2
and why extending the the Spring MVC behavior doesn't work anymore.
I would be grateful for one answer that would add a good explanation for this, and ideally would avoid the full override by @EnableWebMvc
.
EDIT 1
Normally you would add @EnableWebMvc for a Spring MVC app, but Spring
Boot adds it automatically when it sees spring-webmvc on the
classpath.
Reference: https://spring.io/guides/gs/serving-web-content/
Unfortunately it's not a complete explanation for me as I can see spring-webmvc:5.1.2.RELEASE
in my classpath.
I will mark this as answered considering that using @EnableWebMvc
or configuring one @Bean
for ObjectMapper
are working as expected.
I will would still like to know why the @EnableWebMvc
was needed, considering that according to the documentation it shouldn't.
edited Nov 21 at 12:02
answered Nov 19 at 12:59
Táizel Girão Martins
15
15
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53369200%2fcustom-objectmapper-ignored-after-migration-to-spring-boot-2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think your mapper propertyNamingStrategy is not get by spring boot application its getting from hibernate propertyNamingStrategy you should try this. spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy Reference: docs.spring.io/spring-boot/docs/current/reference/html/…
– Raheela Aslam
Nov 19 at 6:28