Spring MVC Template Location -


spring boot stores in template files in /src/main/resources

where configured , how can spring mvc when not using spring boot?

in spring boot templating configured via autoconfiguration, takes information application properties. instance thymeleaf template location can configured this:

spring.thymeleaf.prefix=classpath:/templates/ # prefix gets prepended view names when building url. 

see spring boot properties reference more details.

without using spring boot can configure same behavior specifying custom viewresolver bean , specifying prefix templates. can take @ thymeleafautoconfiguration inspiration.

same principles apply using other templating engines thymeleaf spring mvc.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -