October 2018
Intermediate to advanced
982 pages
23h 29m
English
The method that we overrode, addResourceHandlers(ResourceHandlerRegistry registry), is another configuration method from WebMvcConfigurer, which gives us the ability to define custom mappings for static resource URLs and connect them with the resources on the filesystem or application classpath. In our case, we defined a mapping of anything that is being accessed via the / internal URL to be looked for in the classpath:/ path of our application (for the production environment, you probably don't want to expose the entire classpath as a static resource!).
So let's look at what we did in detail, as follows:
Read now
Unlock full access