September 2015
Intermediate to advanced
206 pages
4h 45m
English
In the previous recipe, we looked at how to tune the URL path mapping for requests and translate them into controller methods. It is also possible to control how our web application deals with static assets and the files that exist on the file system or are bundled in the deployable archive.
Let's say that we want to expose our internal application.properties file via the static web URL of http://localhost:8080/internal/application.properties from our application. To get started with this, proceed with the steps in the next section.
addResourceHandlers, to the WebConfiguration class with the following content:@Override public void addResourceHandlers(ResourceHandlerRegistry ...
Read now
Unlock full access