Ich habe ein sehr seltsames Verhalten von Spring Boot-Anwendung (1.4.0.RELEASE)Frühlings-Boot nicht dient statische JavaScript-Datei
Mein statischer Inhalt liegt unter /src/main/resources/static/*
und einer der Seiten muss CSS und JS-Dateien, aber trotz die Tatsache, dass CSS-Dateien ohne Probleme bedient werden ich 404 für js Dateien bin immer:
für CSS-Datei I
SimpleUrlHandlerMapping : No handler mapping found for [/admin_files/custom_admin.css]
RequestMappingHandlerMapping : Looking up handler method for path /admin_files/custom_admin.css
RequestMappingHandlerMapping : Did not find handler method for [/admin_files/custom_admin.css]
SimpleUrlHandlerMapping: Matching patterns for request [/admin_files/custom_admin.css] are [/**]
SimpleUrlHandlerMapping : Mapping [/admin_files/custom_admin.css] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/], (...)
so sieht es völlig in Ordnung in den Protokollen zu sehen. Doch für JS-Datei es anders aussieht:
SimpleUrlHandlerMapping : No handler mapping found for [/admin_files/vendor/jquery/dist/jquery.min.js]
RequestMappingHandlerMapping : Did not find handler method for [/admin_files/vendor/jquery/dist/jquery.min.js]
SimpleUrlHandlerMapping : Matching patterns for request [/admin_files/vendor/jquery/dist/jquery.min.js] are [/**]
SimpleUrlHandlerMapping : Mapping [/admin_files/vendor/jquery/dist/jquery.min.js] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/] (...)
//
// and now something strange starts to happen BELOW
//
HttpEntityMethodProcessor : Written [{timestamp=Tue Sep 13 23:17:12 CEST 2016, status=404, error=Not Found, message=No message available, path=/admin_files/vendor/jquery/dist/jquery.min.js}] as "application/json" using [org.springfr[email protected]29139aae]
Ich bin wirklich stecken, da es wie eine sehr kleine Panne oder etwas sehr klein aussieht, dass ich irgendwo bin fehlt.
Meine Anwendung sieht wie folgt aus:
@SpringBootApplication
@EnableAsync
@EnableTransactionManagement(proxyTargetClass = true)
@EnableEncryptableProperties
public class Application extends WicketBootSecuredWebApplication { }
ohne benutzerdefinierte Konfiguration Bohnen etc.
tree
in /src/main/resources
ausgeführt:
.
├── application-dev.yml
├── application-prod.yml
├── application-staging.yml
├── application.yml
├── banner.txt
└── static
└── admin_files
├── custom_admin.css
└── vendor
├── jquery
│ ├── jquery.js
│ └── jquery.min.js
└── metisMenu
├── metisMenu.css
├── metisMenu.js
├── metisMenu.min.css
└── metisMenu.min.js
Jede Hilfe dankbar!
Haben Sie konfigurieren 'mvc' Optionen oder links Autokonfiguration? – nurgasemetey
@nurgasemetey Keine 'mvc'-bezogene Konfiguration in meinen Yaml-Dateien. –
Bitte fügen Sie den Projekt-/Ressourcenbaum hinzu – reos