Hi, I have an html(footer) file and a css(webflow) file. But I can't use my css file.
This my conf class
@Configuration
@EnableWebMvc
public class WebConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler(
"/webjars/**",
"/img/**",
"/css/**",
"/js/**")
.addResourceLocations(
"classpath:/META-INF/resources/webjars/",
"classpath:/static/img/",
"classpath:/static/css/",
"classpath:/static/js/");
}
}
CSS not showing/not working
The file named webflow.css does not work on footer.html
<head>
<link rel="stylesheet" th:href="@{../static/css/webflow.css}" media="screen" href="../static/css/webflow.css" type="text/css"/>
</head>
I use th:href label but it's not working. How can i resolve this problem?
frankly, I'm not sure if I've given the addResourceHandler the parameters correctly, but I've tried many different parameters