Follow up to this question
I also tried this, but it blows up with not having a noargs constructor (you can do this with services/controllers/components now, so why doesn't it work here?)
@Configuration
class MyConfig {
@Autowired
MyConfig( final ObjectMapper mapper ) {
...
}
}
and yet this works
@Configuration // or @Service or some bean
class SomeClass ... {
@Autowired
private ObjectMapper objectMapper;
@PostConstruct
private void configureObjectMapper() {
objectMapper.disable( SerializationFeature.WRITE_DATES_AS_TIMESTAMPS );
}
}
why isn't @Configuration
working like other spring managed classes?