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
Post a Comment