title: How to referer in spring-boot-starter-thymeleaf project other html resources from JAR dependencies
body: <p>In our company we want to share and reuse code like functional blocks: all the apps have the same Configuration Master Data, the same User Management, etc. We follow the MVC pattern to obtains this approach like a LEGO construction. We are moving to a new tech stack and the first steps are full of doubts.</p>
  <p>I have a spring boot starter v2  project, the principal one, that has his own html resources and that project has a maven dependency to another project, the secondary, packaged as a JAR file. The secondary is also a spring boot mvc project with its tables, views and so on, and when i try to replace with th:replace in my principal project, thymeleaf Template Resolver fails with a File not Found exception.</p>
  <p>I have tried some solutions but no one works fine. At this point, i´m trying to use a @Config class who extends WebMvcConfigure with ServletContextTemplateResolver instead of SpringResourceTemplateResolver with a few ClassLoaderTemplateResolver. At the end I have test that its the same that application.properties with tag &quot;spring.thymeleaf.*&quot; but i´m stuck with a FileNotFoundException when Thymeleaf try to obtain the html from de secundary JAR.</p>
  <p>I´m thinking that it is <strong>not</strong> posible to share those functional blocks as Spring Boot MVC... Has anyone had success with this idea? I think that i need some extra configuration for Thymeleaf that explicity give 2 points for Resolvers, one for the principal, and other for the secondary. It seems, that i only can load from one project, but no with references to path from other project</p>
  <blockquote>
  <p>template might not exist or might not be accessible by any of the configured Template Resolvers</p>
  </blockquote>
  <p>Thanks</p>