3 ms·
Well. I know what you mean (XML hell). However to some degree doing config stuff in files and not in the code really makes sense... However Spring using JSON a
by rauar 14y ago
Well. I know what you mean (XML hell). However to some degree doing config stuff in files and not in the code really makes sense...
However Spring using JSON as configuration format would be awesome :)
- moondowner 14y agoYou don't need JSON configuration even if it was existing. You can use annotation based configuration (meaning Java classes with annotations like @Configuration, @EnableWebMvc etc..) for > 90% of the configuration cases: http://blog.springsource.org/2011/06/10/spring-3-1-m2-configuration-enhancements/ http://blog.springsource.org/2011/06/10/spring-3-1-m2-config...
- rauar 14y agoI prefer plain files instead of annotations. Just wish the non-readability of XML would go away with less bloated format (which other frameworks did with JSON).
- moondowner 14y agoFair enough argument :) Though, now that I've gotten into the annotation way I like it the most.
- rauar 14y agoI mix them usually. Layer-oriented stuff like @Transactional and @RequestMapping incl. Path/HTTP Method etc. in the code, central declaration stuff like e.g. Marshallers, HandlerAdapters, global ExceptionHandlers in XML... :)