"; then add the configuration " Home >
Article > Web Front-end > What should I do if springmvc does not load css? The solution to springmvc not loading css: first add the default configuration to the SpringMVC configuration as "7ea4b1506262239595c16a77e7a712b1"; then add the configuration " The operating environment of this tutorial: Windows7 system, css3&&Spring5.x version, this method is suitable for all brands of computers . Recommended: "css Video Tutorial" SpringMVC cannot load js, css and other static resource files, and an exception cannot be found when running. How to solve this? Since SpringMVC supports more elegant Rest-style URLs, and url-patten is configured to support all patterns, static resources (css, js, html, etc.) will also be matched. Once the matching fails The console will throw a URI matching exception. In this case, you need to add the default configuration in the SpringMVC configuration After adding the above configuration, the original RequestMapping will be abnormal again. At this time, you need to add the following configuration Note that this configuration generally needs to be added during the development process of SpirngMVC. The above is the detailed content of What should I do if springmvc does not load css?. For more information, please follow other related articles on the PHP Chinese website!What should I do if springmvc does not load css?
<mvc:default-servlet-handler/>
<mvc:annotation-driven></mvc:annotation-driven>