I am using spring boot web secure jdbc sample spring-boot-sample-web-secure-jdbc and want to modify it to load static html files (no template like thymeleaf or jsp needed). I have tried putting the html files under src/main/resources but they are not loading.
I noticed that static file example in samples spring-boot-sample-web-static inherits SpringBootServletInitializer for main class while web secure jdbc use WebMvcConfigurerAdapter. I suppose there might be some more configuration needed to make it work them. Below is my dir tree:
src/main/java/hello/MyController.java
src/main/resources/backupshell.html
src/main/resources/myscripts.js
After moving resources to src/main/resources/resources direct url load works fine but via request url mapping as below is not loading:
#RequestMapping("/admin")
//#ResponseBody
String admin() {
//return "Hello World admin!";
return "backupshell";
}
and logs snippet is as below:
2016-04-18 16:16:51.716 DEBUG 8896 --- [nio-8081-exec-9] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapping [/backupshell] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver#7a9c84a5]]] and 1 interceptor
2016-04-18 16:16:51.716 DEBUG 8896 --- [nio-8081-exec-9] o.s.web.servlet.DispatcherServlet : Last-Modified value for [/backupshell] is: -1
2016-04-18 16:16:51.717 DEBUG 8896 --- [nio-8081-exec-9] o.s.web.servlet.DispatcherServlet : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2016-04-18 16:16:51.717 DEBUG 8896 --- [nio-8081-exec-9] o.s.web.servlet.DispatcherServlet : Successfully completed request
2016-04-18 16:16:51.718 DEBUG 8896 --- [nio-8081-exec-9] o.s.web.servlet.DispatcherServlet : Successfully completed request
2016-04-18 16:16:51.718 DEBUG 8896 --- [nio-8081-exec-9] o.s.b.c.web.OrderedRequestContextFilter : Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade#24880cb8
2016-04-18 16:16:51.718 DEBUG 8896 --- [nio-8081-exec-9] o.s.web.servlet.DispatcherServlet : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/error]
2016-04-18 16:16:51.720 DEBUG 8896 --- [nio-8081-exec-9] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /error
Regards,
Miten.
The root resource directory src/main/resources/ isn't exposed publicly. As described in this post there are 4 directories which are automatically loaded by Spring Boot to serve static content:
/public/
/static/
/resources/
/META-INF/resources/
In your case you can put the HTML and the JS file inside ,e.g., the /public directory:
src/main/resources/public/backupshell.html
src/main/resources/public/myscripts.js
Then you can access the files with the address of your application, with default configuration it would be:
localhost:8080/backupshell.html
Note that 3rd option /resource/ doesn't mean that src/main/resources/ is exposed. It's the src/main/resources/resources/ directory, which can feel quite cumbersome.
Related
I see issues in the Spring cloud config server (Springboot) logs when connecting to the repo where configs are stored. I'm not sure if it's unable to clone because of credentials or something else (git-upload-pack not permitted). Any pointers to this would be great.
2021-10-06 22:52:51.763 INFO 1 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-10-06 22:52:51.764 INFO 1 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2021-10-06 22:52:51.765 INFO 1 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
2021-10-06 22:52:54.769 WARN 1 --- [nio-8080-exec-1] .c.s.e.MultipleJGitEnvironmentRepository : Error occured cloning to base directory.
org.eclipse.jgit.api.errors.TransportException: https://github.asdf.asdf.asdf.com/asdfad/sdasdf: git-upload-pack not permitted on 'https://github.asdf.asdf.adsf.com/sdfdf/asdfsad-configs/'
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:254) ~[org.eclipse.jgit-5.1.3.201810200350-r.jar!/:5.1.3.201810200350-r]
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:306) ~[org.eclipse.jgit-5.1.3.201810200350-r.jar!/:5.1.3.201810200350-r]
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:200) ~[org.eclipse.jgit-5.1.3.201810200350-r.jar!/:5.1.3.201810200350-r]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.cloneToBasedir(JGitEnvironmentRepository.java:612) [spring-cloud-config-server-3.0.4.jar!/:3.0.4]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.copyRepository(JGitEnvironmentRepository.java:587) [spring-cloud-config-server-3.0.4.jar!/:3.0.4]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.createGitClient(JGitEnvironmentRepository.java:570) [spring-cloud-config-server-3.0.4.jar!/:3.0.4]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.refresh(JGitEnvironmentRepository.java:267) [spring-cloud-config-server-3.0.4.jar!/:3.0.4]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.getLocations(JGitEnvironmentRepository.java:245) [spring-cloud-config-server-3.0.4.jar!/:3.0.4]
at org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentRepository.getLocations(MultipleJGitEnvironmentRepository.java:139) [spring-cloud-config-server-3.0.4.jar!/:3.0.4]
The Spring boot app.properties for the config server app looks like this -
spring.cloud.config.server.git.uri=https://github.sdf.sdasdf.asdf.com/asdf/asdf-configs
spring.cloud.config.server.git.username=github-token
spring.cloud.config.server.git.password={github_token}
The endpoint returns the response below:
{"status":"DOWN","components":{"clientConfigServer":{"status":"UNKNOWN","details":{"error":"no property sources located"}},"configServer":{"status":"DOWN","details":{"repository":{"application":"app","profiles":"default"},"error":"org.springframework.cloud.config.server.environment.NoSuchRepositoryException: Cannot clone or checkout repository: https://github-token#github.sdf.sdf.dsfs.com/sdf/sdfsd-configs"}},"discoveryComposite":{"description":"Discovery Client not initialized","status":"UNKNOWN","components":{"discoveryClient":{"description":"Discovery Client not initialized","status":"UNKNOWN"}}},"diskSpace":{"status":"UP","details":{"total":103880232960,"free":24558080000,"threshold":10485760,"exists":true}},"livenessState":{"status":"UP"},"ping":{"status":"UP"},"readinessState":{"status":"UP"},"refreshScope":{"status":"UP"}},"groups":["liveness","readiness"]}
Github token needs to be passed as username which I was configuring against the password property for the spring boot app. The password property needs to be left empty and the Github-token needs to be assigned to the username like below-
spring.cloud.config.server.git.username=asdfasdxxxxxxxyssssysysyssysy
spring.cloud.config.server.git.password=
Token authentication requirements are necesary for Git operations, see this link for more info.:
https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
Try to add .git in the end of the URI in app.properties
spring.cloud.config.server.git.uri=https://github.sdf.sdasdf.asdf.com/asdf/asdf-configs.git
In my Spring Web Application project I've already configured an mvc:resources tag in order to exclude CSS, JS, images ... from DispatcherServlet mapping
Now I need to exclude also a foobar.txt and is placed under /webapp directory like the other static resources but ... It doesn't work.
Here my code snippet
<mvc:resources mapping="/assets/**" location="/assets/" />
<mvc:resources mapping="/foobar.txt" location="/foobar.txt" />
my folder structure is:
/webapp
/webapp/assets
/webapp/foobar.txt
/webapp/...
It's seems like the the first mvc:resources tag (assets) works but the second one (version.txt) doesn't.
I get a 404 page.
These are the difference in console log.
2018-07-12 13:58:25,093 DEBUG [http-nio-8080-exec-6] (DispatcherServlet.java:845) - DispatcherServlet with name 'dispatcher' processing GET request for [/mscbackend/foobar.txt]
2018-07-12 13:58:25,093 DEBUG [http-nio-8080-exec-6] (AbstractHandlerMethodMapping.java:297) - Looking up handler method for path /foobar.txt
2018-07-12 13:58:25,096 DEBUG [http-nio-8080-exec-6] (AbstractHandlerMethodMapping.java:305) - Did not find handler method for [/foobar.txt]
2018-07-12 13:58:25,097 DEBUG [http-nio-8080-exec-6] (AbstractUrlHandlerMapping.java:123) - Mapping [/foobar.txt] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/foobar.txt]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver#66894a78]]] and 1 interceptor
2018-07-12 14:08:27,165 DEBUG [http-nio-8080-exec-7] (DispatcherServlet.java:845) - DispatcherServlet with name 'dispatcher' processing GET request for [/mscbackend/assets/css/style.css]
2018-07-12 14:08:27,165 DEBUG [http-nio-8080-exec-7] (AbstractHandlerMethodMapping.java:297) - Looking up handler method for path /assets/css/style.css
2018-07-12 14:08:27,169 DEBUG [http-nio-8080-exec-7] (AbstractHandlerMethodMapping.java:305) - Did not find handler method for [/assets/css/style.css]
2018-07-12 14:08:27,169 DEBUG [http-nio-8080-exec-7] (AbstractUrlHandlerMapping.java:168) - Matching patterns for request [/assets/css/style.css] are [/assets/**]
The weird thing is that in another similar project same configuration works without problems.
Thanks in advance for your support.
Try below configuration.
<mvc:resources location="/", mapping="/resources/**"/>
OR if you want to give classpath for a particular location use below.
<mvc:resources location="/, classpath:/META-INF/web-resources/" mapping="/resources/**"/>
Try this configuration.
<mvc:resources mapping="/resources/**" location="/resources/" />
I don't why, but sometimes it works. you can give a try.
I ended up getting this log as a result of running my Spring Boot App with a jsp.
2017-12-29 13:30:52.412 WARN 12631 --- [nio-8080-exec-2]
o.s.web.servlet.PageNotFound No mapping found for HTTP
request with URI [/SpringBootTrial/] in DispatcherServlet with name
'dispatcherServlet'
2017-12-29 13:30:56.463 WARN 12631 --- [nio-8080-exec-3]
o.s.web.servlet.PageNotFound No mapping found for HTTP
request with URI [/SpringBootTrial/display] in DispatcherServlet with
name 'dispatcherServlet'
2017-12-29 13:30:56.464 ERROR 12631 --- [nio-8080-exec-3]
o.s.boot.web.support.ErrorPageFilter : Cannot forward to error
page for request [/welcome] as the response has already been
committed. As a result, the response may have the wrong status code.
If your application is running on WebSphere Application Server you may
be able to resolve this problem by setting
com.ibm.ws.webcontainer.invokeFlushAfterService to false
It's evident that in Spring Boot, manual configuration is not needed. So, how should I fix this error?
I am clueless how to fix. I configured the jsp resolver in application.properties.
spring.mvc.view.prefix=/WEB-INF/view/
spring.mvc.view.suffix=.jsp
I have tomcat-embedded-jasper in the pom.xml.
I've developed my first rest service with Spring Boot and Spring Actuator. I needed to change the servlet mapping to a different one. So my code is the following in a #Configuration class:
#Bean
public DispatcherServlet dispatcherServlet() {
return new DispatcherServlet();
}
#Bean
public ServletRegistrationBean dispatcherRegistration(final DispatcherServlet dispatcherServlet) {
final ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet);
registration.addUrlMappings("/api/*");
return registration;
}
The service endpoint is working fine, as I've excluded basic security from it in application.properties:
security.ignored = **/directdebit/**
The problem is that I can't reach the Actuator endpoints. When I try localhost:8080/api/info I get a 404 Not Found error code and I get an audit event with the following data:
AuditEvent [timestamp=Thu Sep 11 12:12:29 CEST 2014, principal=anonymousUser, type=AUTHORIZATION_FAILURE, data={message=Access is denied, type=org.springframework.security.access.AccessDeniedException}]
UPDATE
After removing Spring Security from classpath, I can reach localhost:8080/api/info. So, the problem is related to the security applied to the management endpoints when Spring Security found in classpath.
UPDATE
Still fighting with this. I've restored String Security to the classpath and from stack trace I can see that the mappings are not found:
2014-09-16 11:01:09.011 DEBUG 780 --- [nio-8080-exec-2] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/mappings']
2014-09-16 11:01:09.011 DEBUG 780 --- [nio-8080-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/api/mappings'; against '/mappings'
2014-09-16 11:01:09.011 DEBUG 780 --- [nio-8080-exec-2] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/mappings/']
2014-09-16 11:01:09.011 DEBUG 780 --- [nio-8080-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/api/mappings'; against '/mappings/'
2014-09-16 11:01:09.011 DEBUG 780 --- [nio-8080-exec-2] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/mappings.*']
2014-09-16 11:01:09.012 DEBUG 780 --- [nio-8080-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/api/mappings'; against '/mappings.*'
2014-09-16 11:01:09.012 DEBUG 780 --- [nio-8080-exec-2] o.s.s.web.util.matcher.OrRequestMatcher : No matches found
2014-09-16 11:01:09.012 DEBUG 780 --- [nio-8080-exec-2] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/**']
2014-09-16 11:01:09.012 DEBUG 780 --- [nio-8080-exec-2] o.s.s.w.u.matcher.AntPathRequestMatcher : Request '/api/mappings' matched by universal pattern '/**'
2014-09-16 11:01:09.012 DEBUG 780 --- [nio-8080-exec-2] o.s.s.web.util.matcher.OrRequestMatcher : matched
It looks like the management endpoints are broken if the servlet context path is not '/'. So the question is how can I make Actuator management endpoints aware of the servlet context path?.
The Actuator endpoints are mapped differently from the DispatcherServlet. You can change the path of the Actuator endpoints with the application property management.contextPath, which is by default '/'. You should be able to access your endpoints with localhost:8080/info for example.
I have Spring-boot application which is built with Maven. When I deploy it with STS( Run as Spring Boot App) it works fine, but when I use IntelliJ Idea it doesn't work.
There is no error in log during deployment process. But when I try to refresh page I got this:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing
this as a fallback. Mon Aug 04 14:48:38 CEST 2014 There was an
unexpected error (type=Not Found, status=404).
I've added Spring module to project. After I added this I have added some XML's XML based configurations and my Application.java class to Code based configurations.
I've changed logging to FINEST and noticed that when I reload page there are some differences in logs between working and not working version.
Not working version
DEBUG [org.springframework.web.servlet.view.JstlView] - Forwarding to resource [/WEB-INF/jsp/layouts/default.jsp] in InternalResourceView 'layouts/default'
DEBUG [org.springframework.web.servlet.DispatcherServlet] - DispatcherServlet with name 'dispatcherServlet' processing GET request for [/WEB-INF/jsp/layouts/default.jsp]
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Looking up handler method for path /WEB-INF/jsp/layouts/default.jsp
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Did not find handler method for [/WEB-INF/jsp/layouts/default.jsp]
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Matching patterns for request [/WEB-INF/jsp/layouts/default.jsp] are [/**]
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - URI Template variables for request [/WEB-INF/jsp/layouts/default.jsp] are {}
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Mapping [/WEB-INF/jsp/layouts/default.jsp] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.ResourceHttpRequestHandler#29a502a0] and 1 interceptor
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Last-Modified value for [/WEB-INF/jsp/layouts/default.jsp] is: -1
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Ignoring invalid resource path [WEB-INF/jsp/layouts/default.jsp]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - No matching resource found - returning 404
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
DEBUG [org.springframework.web.servlet.DispatcherServlet] - DispatcherServlet with name 'dispatcherServlet' processing GET request for [/error]
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Looking up handler method for path /error
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Returning handler method [public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)]
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'basicErrorController'
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Last-Modified value for [/error] is: -1
DEBUG [org.springframework.web.servlet.view.ContentNegotiatingViewResolver] - Requested media types are [text/html, text/html;q=0.8] based on Accept header types and producible media types [text/html])
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'error'
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'error'
TRACE [class which inherates from UrlBasedViewResolver] - Cached view [error]
TRACE [class which inherates from UrlBasedViewResolver] - Cached view [error]
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'error'
DEBUG [org.springframework.web.servlet.view.ContentNegotiatingViewResolver] - Returning [org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$SpelView#758e2ae8] based on requested media type 'text/html'
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Rendering view [org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$SpelView#758e2ae8] in DispatcherServlet with name 'dispatcherServlet'
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
Working version
DEBUG [org.springframework.web.servlet.view.JstlView] - Forwarding to resource [/WEB-INF/jsp/layouts/default.jsp] in InternalResourceView 'layouts/default'
INFO [org.apache.jasper.compiler.TldLocationsCache] - At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
DEBUG [org.springframework.web.servlet.DispatcherServlet] - DispatcherServlet with name 'dispatcherServlet' processing GET request for [/bootstrap/css/bootstrap.min.css]
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Looking up handler method for path /bootstrap/css/bootstrap.min.css
DEBUG [org.springframework.web.servlet.DispatcherServlet] - DispatcherServlet with name 'dispatcherServlet' processing GET request for [/css/bootstrap-fix.css]
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Looking up handler method for path /css/bootstrap-fix.css
DEBUG [org.springframework.web.servlet.DispatcherServlet] - DispatcherServlet with name 'dispatcherServlet' processing GET request for [/bootstrap/js/bootstrap.min.js]
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Looking up handler method for path /bootstrap/js/bootstrap.min.js
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Did not find handler method for [/bootstrap/css/bootstrap.min.css]
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Did not find handler method for [/css/bootstrap-fix.css]
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Matching patterns for request [/css/bootstrap-fix.css] are [/**]
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - URI Template variables for request [/css/bootstrap-fix.css] are {}
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Did not find handler method for [/bootstrap/js/bootstrap.min.js]
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Matching patterns for request [/bootstrap/js/bootstrap.min.js] are [/**]
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - URI Template variables for request [/bootstrap/js/bootstrap.min.js] are {}
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Matching patterns for request [/bootstrap/css/bootstrap.min.css] are [/**]
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - URI Template variables for request [/bootstrap/css/bootstrap.min.css] are {}
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Mapping [/css/bootstrap-fix.css] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.ResourceHttpRequestHandler#ff47cbc] and 1 interceptor
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Last-Modified value for [/css/bootstrap-fix.css] is: -1
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [css/bootstrap-fix.css] against base location: ServletContext resource [/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [css/bootstrap-fix.css] against base location: class path resource [META-INF/resources/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [css/bootstrap-fix.css] against base location: class path resource [resources/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [css/bootstrap-fix.css] against base location: class path resource [static/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Found matching resource: class path resource [static/css/bootstrap-fix.css]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Determined media type 'text/css' for class path resource [static/css/bootstrap-fix.css]
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Mapping [/bootstrap/css/bootstrap.min.css] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.ResourceHttpRequestHandler#ff47cbc] and 1 interceptor
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Last-Modified value for [/bootstrap/css/bootstrap.min.css] is: -1
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Mapping [/bootstrap/js/bootstrap.min.js] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.ResourceHttpRequestHandler#ff47cbc] and 1 interceptor
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Last-Modified value for [/bootstrap/js/bootstrap.min.js] is: -1
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [bootstrap/css/bootstrap.min.css] against base location: ServletContext resource [/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [bootstrap/css/bootstrap.min.css] against base location: class path resource [META-INF/resources/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [bootstrap/css/bootstrap.min.css] against base location: class path resource [resources/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [bootstrap/css/bootstrap.min.css] against base location: class path resource [static/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Found matching resource: class path resource [static/bootstrap/css/bootstrap.min.css]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Determined media type 'text/css' for class path resource [static/bootstrap/css/bootstrap.min.css]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [bootstrap/js/bootstrap.min.js] against base location: ServletContext resource [/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [bootstrap/js/bootstrap.min.js] against base location: class path resource [META-INF/resources/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [bootstrap/js/bootstrap.min.js] against base location: class path resource [resources/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [bootstrap/js/bootstrap.min.js] against base location: class path resource [static/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Found matching resource: class path resource [static/bootstrap/js/bootstrap.min.js]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Determined media type 'application/javascript' for class path resource [static/bootstrap/js/bootstrap.min.js]
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
DEBUG [org.springframework.web.servlet.DispatcherServlet] - DispatcherServlet with name 'dispatcherServlet' processing GET request for [/javascript/jquery-1.8.3.min.js]
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Looking up handler method for path /javascript/jquery-1.8.3.min.js
DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Did not find handler method for [/javascript/jquery-1.8.3.min.js]
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Matching patterns for request [/javascript/jquery-1.8.3.min.js] are [/**]
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - URI Template variables for request [/javascript/jquery-1.8.3.min.js] are {}
DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - Mapping [/javascript/jquery-1.8.3.min.js] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.ResourceHttpRequestHandler#ff47cbc] and 1 interceptor
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Last-Modified value for [/javascript/jquery-1.8.3.min.js] is: -1
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [javascript/jquery-1.8.3.min.js] against base location: ServletContext resource [/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [javascript/jquery-1.8.3.min.js] against base location: class path resource [META-INF/resources/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [javascript/jquery-1.8.3.min.js] against base location: class path resource [resources/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Trying relative path [javascript/jquery-1.8.3.min.js] against base location: class path resource [static/]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Found matching resource: class path resource [static/javascript/jquery-1.8.3.min.js]
DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - Determined media type 'application/javascript' for class path resource [static/javascript/jquery-1.8.3.min.js]
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
Class which is giving some error inherates from UrlBasedViewResolver, but I have no idea what can I do with that. Cached view [error] gives me no clue.
What might cause this problems?
EDIT
I forgot to mention:
STS 3.5.1
IntelliJ Idea 13.1
STS has a number of Eclipse plugins that you won't find in IntelliJ. To get a Spring Boot application running from IntelliJ, you need to create a Maven run configuration with the command "spring-boot:run" and make sure it points at the correct module, if your app has multiple modules in it.