thymeleaf / thymeleaf-docs

Thymeleaf documentation
Apache License 2.0
44 stars 54 forks source link

Switch to JavaConfig in Spring-enabled examples and applications #26

Closed danielfernandez closed 8 years ago

danielfernandez commented 9 years ago

In order to keep up with the times ;) we should modify the way we are configuring Spring in most of our Spring-enabled example applications and use JavaConfig instead of XML. As a consequence, this will also mean modifying some parts of our documentation (tutorials, articles) which include snippets of Spring configuration code, currently in XML.

The list of modifications to be done are:

Note that, for the "Thymeleaf + Spring" tutorial (and only for that one), it would be nice to keep a couple of code samples --only the most relevant ones-- in the docs in both versions, XML and JavaConfig, so that we cover both possibilities. For example, this could apply to the samples explaining how the ViewResolver and all related beans like TemplateEngine, TemplateResolver, etc. are registered, but not further than their first appearance, and never for more advanced concepts like registering the ConversionService and such.

Also note that we can exclude the petclinic application from this refactoring, given it is much more complex and after all it basically mirrors a standard Spring sample application, which was using XML at least when we forked it.