No CSS is applied to the webpage on IntelliJ Ultimate.
Answered
Hello, community.
I am using IntelliJ-Ultimate and it's a Spring MVC project with the thymeleaf template engine.
In the project there's a login page (i.e login.html) in the file I have clearly specified the path to the stylesheets, yet while running the CSS isn't applied.I have also used "th:href = "@{/static/login.css}"
Also to mention, that I have my .html files in src/..../resources and my stylesheets in src/..../resources/static.
I also have disabled tymeleaf caching in the application.properties.
How should I proceed? Please tell me if you require screenshot of any files.
Thank you.
Please sign in to leave a comment.
Does it work correctly if you build/run this project outside of IntelliJ IDEA, via Gradle or Maven?
Hey didn't tried that before and yeah doesn't work with that too. So it's not a prob with IntelliJ-U
It means that the issue is not specific to IntelliJ IDEA, it's either a problem with your code, a configuration issue or some framework bug. You can ask this question at https://stackoverflow.com/.
Thanks, Serge Baranov. Actually, this error occurred because I didn't have my Spring Boot project configured for resource handlers (Beginner's mistake). For people with the same problem, https://www.baeldung.com/spring-mvc-static-resources here is a helpful link.
@... thanks