maven+cxf+spring

maven整合cxf、spring

一、创建maven项目

1.新建maven project


 

 
 二、添加cxf、spring到pom.xml文件

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>cxfDemo</groupId>
	<artifactId>cxfDemo</artifactId>
	<packaging>war</packaging>
	<version>0.0.1-SNAPSHOT</version>
	<name>cxfDemo Maven Webapp</name>
	<url>http://maven.apache.org</url>
    
	<build>
	 	<finalName>cxfDemo</finalName>
	</build>
	<!-- 定义全局版本号 -->
  	<properties>
  <!-- 		<jre.source.version>1.6</jre.source.version>
		<jre.target.version>1.6</jre.target.version> -->
		<junit.version>4.11</junit.version>
		<cxf.version>2.2.3</cxf.version>
		<spring.version>3.2.3.RELEASE</spring.version>
		<slf4j.version>1.7.7</slf4j.version>
		<servlet.version>2.5</servlet.version>
	</properties>
	<!-- 定义依赖包-->  
  	<dependencies>
	    <dependency>
	      <groupId>junit</groupId>
	      <artifactId>junit</artifactId>
	      <version>${junit.version}</version>
	      <scope>test</scope>
    	</dependency>
    
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>${servlet.version}</version>
			<scope>provided</scope>
		</dependency>
		
		<!-- CXF Dependencies -->
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http</artifactId>
			<version>${cxf.version}</version>
			
		</dependency>
		<!-- Jetty is needed if you're are not using the CXFServlet -->
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http-jetty</artifactId>
			<version>${cxf.version}</version>
			<scope>test</scope>
		</dependency>
		<!-- End of CXF Dependencies -->
	
		<!-- Spring Dependencies ${spring.version} -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
		</dependency>
	
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${spring.version}</version>
		</dependency>
	
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${slf4j.version}</version>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>


		
  	</dependencies>	
  
</project>

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值