SpringFramework=rest

<dependencies>
	<!-- Spring -->
	<dependency>
		<groupId>org.springframework</groupId>
		<artifactId>spring-web</artifactId>
		<version>${spring.version}</version>
	</dependency>
	<!-- CXF -->
	<dependency>
		<groupId>org.apache.cxf</groupId>
		<artifactId>cxf-rt-frontend-jaxrs</artifactId>
		<version>${cxf.version}</version>
	</dependency>
	<!-- Jackson -->
	<dependency>
		<groupId>com.fasterxml.jackson.jaxrs</groupId>
		<artifactId>jackson-jaxrs-json-provider</artifactId>
		<version>${jackson.version}</version>
	</dependency>
</dependencies>
<!-- Spring -->
<context-param>
	<param-name>contextConfigLocation</param-name>
	<param-value>classpath:spring.xml</param-value>
</context-param>
<listener>
	<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- CXF -->
<servlet>
	<servlet-name>cxf</servlet-name>
	<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
</servlet>
<servlet-mapping>
	<servlet-name>cxf</servlet-name>
	<url-pattern>/ws/*</url-pattern>
</servlet-mapping>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
	   xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:cxf="http://cxf.apache.org/core"
	   xmlns:context="http://www.springframework.org/schema/context"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd 
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
 
	<!-- 发布配置添加的文件 -->
	<import resource="classpath:META-INF/cxf/cxf.xml" />
	<!--<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />-->
	<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
	
	<!-- 安全访问认证拦截器 -->
	<bean id="securityInterceptor"
		  class="com.tunsuy.rest.interceptor.RestSecurityInterceptor" />
		  
	<bean id="backupVaultRestService"
		  class="com.tunsuy.rest.service.platform.cloudresource.BackupVaultRestServiceImpl" />
	<jaxrs:server id="siteServiceContainer" address="/sites">
		<jaxrs:inInterceptors>
			<ref bean="securityInterceptor" />
		</jaxrs:inInterceptors>
		<jaxrs:providers>
			<bean class="com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider" />
		</jaxrs:providers>
		<jaxrs:serviceBeans>
			<ref bean="backupVaultRestService"/>
		</jaxrs:serviceBeans>
	</jaxrs:server>
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 护眼 设计师:闪电赇 返回首页
实付 19.90元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值