Hallo, ich versuche, CSS und JS zu meinem Projekt hinzuzufügen. Ich habe das Spring-Starter-Projekt erstellt und css- und js-Dateien in webapp/resources abgelegt, aber es funktioniert nicht.Wohin mit css, js-Dateien im Frühling?
Wie soll ich sie in meinem HTML-Datei enthalten? Was ist der Weg?
Ich habe auch
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry
.addResourceHandler("/resources/**")
.addResourceLocations("/resources/");
}
meiner springConfig Klasse hinzugefügt.
Mögliche Duplikat [Spring MVC - Struktur Projekt - Best Practices] (https://stackoverflow.com/questions/23550273/spring-mvc- Projekt-Struktur-Best-Practices) –
@PatrickBarr Sorry, aber ich habe meine Antwort nicht gefunden –