2015-12-15 59 views
0

我已經使用Spring Boot基於此tuto創建了SOAP Web服務:https://spring.io/guides/gs/producing-web-service/#scratch在SOAP Web服務中無法訪問Spring Boot Actuator端點

該Web服務很好。但我不能達到正常嵌入在春季啓動應用程序的執行器端點:/ env的,/健康等

這裏是主要的配置類我的應用程序:

@EnableWs 
@Configuration 
public class WebServiceConfig extends WsConfigurerAdapter { 

    public final static Logger logger = Logger.getLogger(WebServiceConfig.class); 

    @Autowired 
    private WSProperties wsProperties; 

    @Bean 
    public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) { 
     MessageDispatcherServlet servlet = new MessageDispatcherServlet(); 

     servlet.setApplicationContext(applicationContext); 
     servlet.setTransformWsdlLocations(true); 

     String urlMappings = wsProperties.getLocationUri() + "/*"; 

     return new ServletRegistrationBean(servlet, urlMappings); 
    } 

    /* 
    * Wsdl11Definition based on a static existing WSDL file 
    */ 
    @Bean(name = "myDomain") 
    public Wsdl11Definition staticWsdl11Definition(XsdSchema schema){ 
     logger.info("Loading Wsdl11Definition from existing WSDL file"); 

     SimpleWsdl11Definition wsdl11Definition = new SimpleWsdl11Definition(); 
     wsdl11Definition.setWsdl(new ClassPathResource(wsProperties.getWsdlLocation())); 
     return wsdl11Definition; 
    } 

    @Bean 
    public XsdSchema schema() { 
     logger.info("Loading XSD schema"); 

     return new SimpleXsdSchema(new ClassPathResource(wsProperties.getSchemaLocation())); 
    } 

    /* 
    * Declaration of the custom EsceptionResolver to customize SoapFault elements when some exception is thrown. 
    */ 
    @Bean(name = "soapFaultAnnotationExceptionResolver") 
    public DetailSoapFaultDefinitionExceptionResolver exceptionResolver(ApplicationContext applicationContext){ 
     DetailSoapFaultDefinitionExceptionResolver exceptionResolver = new DetailSoapFaultDefinitionExceptionResolver(); 

     SoapFaultDefinition soapFaultDefinition = new SoapFaultDefinition(); 
     soapFaultDefinition.setFaultCode(SoapFaultDefinition.SERVER); 
     exceptionResolver.setDefaultFault(soapFaultDefinition); 

     return exceptionResolver; 
    } 

    /* 
    * Message source for internationalization. 
    */ 
    @Bean 
    public ReloadableResourceBundleMessageSource messageSource() { 
     ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); 
     messageSource.setBasename("classpath:locale/messages"); 
     messageSource.setCacheSeconds(3600); // refresh cache once per hour 

     return messageSource; 
    } 
} 

任何想法?

回答

0

好吧,愚蠢的問題,愚蠢的答案。

我錯過了我的pom.xml中的spring-boot-starter-actuator依賴關係...