[bs-132] Actuator should use delegating version of MVC support
The delegating version delegates to other configurers, and it's what @EnableWebMvc uses. You effectively switch off the delegation if you use the base class by mistake. [Fixes #50267017] [bs-132] Static resources in /css/** cannot be served by Actuator project
This commit is contained in:
parent
29a81b8795
commit
5f7f69ad93
|
@ -24,7 +24,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.web.servlet.DispatcherServlet;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
import org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration;
|
||||
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
|
||||
|
@ -34,7 +34,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
|
|||
*/
|
||||
@ConditionalOnClass({ Servlet.class, DispatcherServlet.class })
|
||||
@Configuration
|
||||
public class ActuatorWebConfiguration extends WebMvcConfigurationSupport {
|
||||
public class ActuatorWebConfiguration extends DelegatingWebMvcConfiguration {
|
||||
|
||||
@Override
|
||||
protected void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
|
@ -46,6 +46,7 @@ public class ActuatorWebConfiguration extends WebMvcConfigurationSupport {
|
|||
SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
}
|
||||
}
|
||||
super.configureMessageConverters(converters);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
<artifactId>spring-bootstrap</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-bootstrap-actuator</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
|
|
|
@ -4,4 +4,3 @@ handlers = java.util.logging.ConsoleHandler
|
|||
java.util.logging.ConsoleHandler.level = FINE
|
||||
sun.net.www.protocol.http.HttpURLConnection.level = ALL
|
||||
org.springframework.bootstrap.context.annotation.level = ALL
|
||||
org.thymeleaf.level = ALL
|
Loading…
Reference in New Issue