public class GrailsWebResourcesEnvironmentPostProcessor extends java.lang.Object implements EnvironmentPostProcessor
Defaults spring.web.resources.add-mappings to false for Grails servlet web
applications. Grails 8 no longer injects @EnableWebMvc, so Spring Boot's
WebMvcAutoConfiguration is active and would otherwise register a catch-all ('/**')
static-resource handler over classpath:/META-INF/resources/, classpath:/resources/,
classpath:/static/ and classpath:/public/. Grails already serves those same
locations under /static/** (see ControllersAutoConfiguration), so the Boot
catch-all is redundant and would change the 404 semantics of unmapped URLs by letting files in
those locations shadow them.
Contributed as a Spring Boot default property (lowest precedence), so an application can restore
Boot's behavior with spring.web.resources.add-mappings=true.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |