SpringBoot应用程序中的MvcConf

时间:2017-05-26 08:51:35

标签: java spring-mvc spring-boot thymeleaf

我有一个基本的SpringBoot应用程序。使用Spring Initializer,嵌入式Tomcat,Thymeleaf模板引擎和包作为可执行的JAR文件。

我在application.properties

中定义了这个属性
server.contextPath=/tdk

我在配置包中添加了这个类:

@Configuration
public class MvcConf extends WebMvcConfigurationSupport {

}

然后应用程序无法找到任何资源。删除课程一切都很好:

[THYMELEAF] TEMPLATE ENGINE CONFIGURED OK
27932 [http-nio-8080-exec-1] INFO  org.thymeleaf.TemplateEngine - [THYMELEAF] TEMPLATE ENGINE INITIALIZED
28150 [http-nio-8080-exec-3] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/tdk/css/styles.css] in DispatcherServlet with name 'dispatcherServlet'
28150 [http-nio-8080-exec-2] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/tdk/fonts/font-awesome/css/font-awesome.min.css] in DispatcherServlet with name 'dispatcherServlet'
28150 [http-nio-8080-exec-5] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/tdk/css/side-menu.css] in DispatcherServlet with name 'dispatcherServlet'
28151 [http-nio-8080-exec-4] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/tdk/css/jquery.mCustomScrollbar.css] in DispatcherServlet with name 'dispatcherServlet'
28152 [http-nio-8080-exec-6] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/tdk/css/login.css] in DispatcherServlet with name 'dispatcherServlet'
28153 [http-nio-8080-exec-7] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/webjars/bootstrap/3.3.7-1/css/bootstrap.min.css] in DispatcherServlet with name 'dispatcherServlet'
28209 [http-nio-8080-exec-8] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/webjars/jquery/3.2.0/jquery.min.js] in DispatcherServlet with name 'dispatcherServlet'
28210 [http-nio-8080-exec-9] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/tdk/js/jquery.floatThead.min.js] in DispatcherServlet with name 'dispatcherServlet'
28210 [http-nio-8080-exec-10] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/tdk/js/jquery.mCustomScrollbar.concat.min.js] in DispatcherServlet with name 'dispatcherServlet'
28215 [http-nio-8080-exec-7] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/tdk/images/login.png] in DispatcherServlet with name 'dispatcherServlet'
28216 [http-nio-8080-exec-1] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/webjars/bootstrap/3.3.7-1/js/bootstrap.min.js] in DispatcherServlet with name 'dispatcherServlet'
28232 [http-nio-8080-exec-4] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/tdk/js/jquery.mCustomScrollbar.concat.min.js] in DispatcherServlet with name 'dispatcherServlet'
28262 [http-nio-8080-exec-5] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/webjars/jquery/3.2.0/jquery.min.js] in DispatcherServlet with name 'dispatcherServlet'
28271 [http-nio-8080-exec-2] WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/tdk/webjars/bootstrap/3.3.7-1/js/bootstrap.min.js] in DispatcherServlet with name 'dispatcherServlet'

0 个答案:

没有答案