@EnableWebMvc And OpenApi Issue#
Notes#
- Don't use annotation
@EnableWebMvcif you are not using advance features ofWebMvcConfigurer, in stead let extend directly fromWebMvcConfigurationSupport. Because when you use@EnableWebMvcsome default bean ofSpring Bootwill be overridden and it will cause of some issue that you won't expect. - For example, if you are using OpenApi generator and in some configuration file you use annotation
@EnableWebMvcthen you can see format datetime of openapi will response numbers asEpoch(Ex: 1702629738) not the type that human can read as2011-12-03T10:15:30. It is because the defaultObjectMapperof Spring Boot has been overridden and it is hard for you to reconfigure it again.