0

I have a basic SpringBoot app. using Spring Initializer, embedded Tomcat, Thymeleaf template engine, and package as an executable JAR file.

I have this property defined in the application.properties

server.contextPath=/tdk

I added this class in the config package:

@Configuration
public class MvcConf extends WebMvcConfigurationSupport {

}

and then the application is not able to find any resource. Removing the class everything is fine again:

[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'
Nuñito Calzada
  • 4,394
  • 47
  • 174
  • 301
  • By resource, you mean static resources (js, css, templates...) or any endpoint? – nick79 May 26 '17 at 09:05
  • 1
    Extending `WebMvcConfigurationSupport` will switch off the `WebMvcAutoConfiguration`. That's why when you remove `MvcConf` everything is fine again because `WebMvcAutoConfiguration` is ON. What is your need for extending `WebMvcConfigurationSupport`? – Issam El-atif May 26 '17 at 09:12
  • trying to fix this other issue :-) https://stackoverflow.com/questions/44176335/restclientexception-could-not-extract-response-no-suitable-httpmessageconverte – Nuñito Calzada May 26 '17 at 12:25

0 Answers0