import javax.xml.ws.Endpoint;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.transport.servlet.CXFServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;
@Configuration
public class CxfConfig {
@Bean
public ServletRegistrationBean dispatcherRegistration(
DispatcherServlet dispatcherServlet) {
return new ServletRegistrationBean(
dispatcherServlet, "/*");
}
@Bean
public ServletRegistrationBean servletRegistrationBean() {
return new ServletRegistrationBean(
new CXFServlet(), "/services/*");
}
@Bean(name = Bus.DEFAULT_BUS_ID)
public SpringBus springBus() {
return new SpringBus();
}
@Bean
public WebServiceInterface app1() {
return new app1impl();
}
@Bean
public Endpoint endpoint() {
EndpointImpl endpoint = new EndpointImpl(springBus(), app1());
endpoint.publish("/app1");
return endpoint;
}
}
springboot CXF配置類
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
相關(guān)閱讀更多精彩內(nèi)容
- 整個(gè)springboot并沒(méi)有在spring的基礎(chǔ)上提供什么額外的功能。從開(kāi)發(fā)人員的角度來(lái)看,springBoot...
- Redis是我們常用的高速NoSql數(shù)據(jù)庫(kù),重要性毋庸贅言,本文介紹一下如何快速的在Springboot中集成單節(jié)...
- pom.xml redis.properties配置 工具類 使用junit測(cè)試 存入成功以后去緩存中查詢驗(yàn)證一下...
- springboot偏好使用java class類型的來(lái)引入配置屬性,也就是將properties、json、YM...
- 1.先引入maven依賴 2.新建一個(gè)Java類 prefix代表屬性文件中的前綴,@PropertySource...