I'm using spring boot with thymeleaf and all my resources are outside spring application on a path like "/../../css/main.css"
. On dev env should resolve the path using an url and live env go on the path.
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
String templates=env.getProperty("spring.thymeleaf.prefix");
registry.addResourceHandler("/../../css/**")
.addResourceLocations(templates);
}
// spring.thymeleaf.prefix = http://website.com/assets/
Why the resource handler is not handling these kind of resources, but if I "/**"
is handling without problems? Am I missing something?
Edit: if resourceHandler
is "/css/**"
and location is an url is not being handled either