Java 未在Websphere application server中调用Spring boot addInterceptors
我有一个使用SpringWS的SpringBoot应用程序。在WsConfigurerAdapter内部,我覆盖addInterceptors以添加日志记录/身份验证/验证等Java 未在Websphere application server中调用Spring boot addInterceptors,java,spring,websphere,Java,Spring,Websphere,我有一个使用SpringWS的SpringBoot应用程序。在WsConfigurerAdapter内部,我覆盖addInterceptors以添加日志记录/身份验证/验证等 @Configuration @EnableCaching @EnableWs public class WebServiceConfig extends WsConfigurerAdapter { ... @Override public void addInterceptors(List&l
@Configuration
@EnableCaching
@EnableWs
public class WebServiceConfig extends WsConfigurerAdapter {
...
@Override
public void addInterceptors(List<EndpointInterceptor> interceptors) {
EnvironmentSettings environment = getEnvironmentSettings();
interceptors.add(getLogSetupInterceptor());
interceptors.add(getAuthenticationInterceptor());
interceptors.add(getServerLoggingInterceptor());
interceptors.add(getAuthorizationInterceptor());
ServerPayloadValidatingInterceptor validatingInterceptor = new ServerPayloadValidatingInterceptor();
validatingInterceptor.setValidateRequest(environment.isValidateSoapRequest());
validatingInterceptor.setValidateResponse(environment.isValidateSoapResponse());
validatingInterceptor.setXsdSchema( xsdSchema());
interceptors.add(validatingInterceptor);
}
}
我知道我做错了什么。原来我在/*的WebServiceConfig和web.xml中都创建了一个servlet映射。我发现我做错了什么。原来我在我的WebServiceConfig和web.xml中都在/*处创建了一个servlet映射
@SpringBootApplication
public class Application extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}