WebService服务端项目结构:
Spring+SpringMVC+Mybatis+Maven+CXF+WebService整合之服务端
Spring+SpringMVC+Mybatis+Maven+CXF+WebService整合之服务端
  1 <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/xsd/maven-4.0.0.xsd">
  2   <modelVersion>4.0.0</modelVersion>
  3   <groupId>com.erry</groupId>
  4   <artifactId>HydSSMDemo2</artifactId>
  5   <version>0.0.1-SNAPSHOT</version>
  6   <packaging>war</packaging>
  7   
  8    <properties>  
  9         <!-- spring版本号 -->  
 10         <spring.version>4.0.2.RELEASE</spring.version>  
 11         <!-- mybatis版本号 -->  
 12         <mybatis.version>3.2.6</mybatis.version>  
 13         <!-- log4j日志文件管理包版本 -->  
 14 <!--        <slf4j.version>1.7.7</slf4j.version>  -->
 15 <!--        <log4j.version>1.2.17</log4j.version>  -->
 16     </properties> 
 17     
 18     <dependencies>
 19         <dependency>
 20             <groupId>junit</groupId>
 21             <artifactId>junit</artifactId>
 22             <version>3.8.1</version>
 23              <!-- 表示开发的时候引入,发布的时候不会加载此包 -->  
 24             <scope>test</scope>
 25         </dependency>
 26         <!-- <dependency>
 27             <groupId>javax.servlet</groupId>
 28             <artifactId>javax.servlet-api</artifactId>
 29             <version>3.1.0</version>
 30         </dependency> -->
 31         
 32          <!-- spring核心包 -->  
 33         <dependency>  
 34             <groupId>org.springframework</groupId>  
 35             <artifactId>spring-core</artifactId>  
 36             <version>${spring.version}</version>  
 37         </dependency>  
 38   
 39         <dependency>  
 40             <groupId>org.springframework</groupId>  
 41             <artifactId>spring-web</artifactId>  
 42             <version>${spring.version}</version>  
 43         </dependency>  
 44         <dependency>  
 45             <groupId>org.springframework</groupId>  
 46             <artifactId>spring-oxm</artifactId>  
 47             <version>${spring.version}</version>  
 48         </dependency>  
 49         <dependency>  
 50             <groupId>org.springframework</groupId>  
 51             <artifactId>spring-tx</artifactId>  
 52             <version>${spring.version}</version>  
 53         </dependency>  
 54   
 55         <dependency>  
 56             <groupId>org.springframework</groupId>  
 57             <artifactId>spring-jdbc</artifactId>  
 58             <version>${spring.version}</version>  
 59         </dependency>  
 60   
 61         <dependency>  
 62             <groupId>org.springframework</groupId>  
 63             <artifactId>spring-webmvc</artifactId>  
 64             <version>${spring.version}</version>  
 65         </dependency>  
 66         <dependency>  
 67             <groupId>org.springframework</groupId>  
 68             <artifactId>spring-aop</artifactId>  
 69             <version>${spring.version}</version>  
 70         </dependency>  
 71   
 72         <dependency>  
 73             <groupId>org.springframework</groupId>  
 74             <artifactId>spring-context-support</artifactId>  
 75             <version>${spring.version}</version>  
 76         </dependency>  
 77   
 78         <dependency>  
 79             <groupId>org.springframework</groupId>  
 80             <artifactId>spring-test</artifactId>  
 81             <version>${spring.version}</version>  
 82         </dependency>  
 83         <!-- mybatis核心包 -->  
 84         <dependency>  
 85             <groupId>org.mybatis</groupId>  
 86             <artifactId>mybatis</artifactId>  
 87             <version>${mybatis.version}</version>  
 88         </dependency>  
 89          <!-- mybatis/spring包 -->  
 90         <dependency>  
 91             <groupId>org.mybatis</groupId>  
 92             <artifactId>mybatis-spring</artifactId>  
 93             <version>1.2.2</version>  
 94         </dependency>  
 95         
 96          <!-- 导入java ee jar 包 -->  
 97         <dependency>  
 98             <groupId>javax</groupId>  
 99             <artifactId>javaee-api</artifactId>  
100             <version>7.0</version>  
101         </dependency>  
102         
103         <!-- 导入dbcp的jar包,用来在applicationContext.xml中配置数据库 -->  
104         <dependency>  
105             <groupId>commons-dbcp</groupId>  
106             <artifactId>commons-dbcp</artifactId>  
107             <version>1.2.2</version>  
108         </dependency>  
109         
110         <!-- JSTL标签类 -->  
111         <dependency>  
112             <groupId>jstl</groupId>  
113             <artifactId>jstl</artifactId>  
114             <version>1.2</version>  
115         </dependency>  
116         <!-- 日志文件管理包 -->  
117         <!-- log start -->  
118 <!--        <dependency>  -->
119 <!--            <groupId>log4j</groupId>  -->
120 <!--            <artifactId>log4j</artifactId>  -->
121 <!--            <version>${log4j.version}</version>  -->
122 <!--        </dependency>  -->
123           
124           
125         <!-- 格式化对象,方便输出日志 -->  
126 <!--        <dependency>  -->
127 <!--            <groupId>com.alibaba</groupId>  -->
128 <!--            <artifactId>fastjson</artifactId>  -->
129 <!--            <version>1.1.41</version>  -->
130 <!--        </dependency>  -->
131   
132   
133 <!--        <dependency>  -->
134 <!--            <groupId>org.slf4j</groupId>  -->
135 <!--            <artifactId>slf4j-api</artifactId>  -->
136 <!--            <version>${slf4j.version}</version>  -->
137 <!--        </dependency>  -->
138 <!--  -->
139 <!--        <dependency>  -->
140 <!--            <groupId>org.slf4j</groupId>  -->
141 <!--            <artifactId>slf4j-log4j12</artifactId>  -->
142 <!--            <version>${slf4j.version}</version>  -->
143 <!--        </dependency>  -->
144         <!-- log end -->  
145         <!-- 映入JSON -->  
146         <dependency>  
147             <groupId>org.codehaus.jackson</groupId>  
148             <artifactId>jackson-mapper-asl</artifactId>  
149             <version>1.9.13</version>  
150         </dependency>  
151         <!-- 上传组件包 -->  
152 <!--        <dependency>  -->
153 <!--            <groupId>commons-fileupload</groupId>  -->
154 <!--            <artifactId>commons-fileupload</artifactId>  -->
155 <!--            <version>1.3.1</version>  -->
156 <!--        </dependency>  -->
157 <!--        <dependency>  -->
158 <!--            <groupId>commons-io</groupId>  -->
159 <!--            <artifactId>commons-io</artifactId>  -->
160 <!--            <version>2.4</version>  -->
161 <!--        </dependency>  -->
162 <!--        <dependency>  -->
163 <!--            <groupId>commons-codec</groupId>  -->
164 <!--            <artifactId>commons-codec</artifactId>  -->
165 <!--            <version>1.9</version>  -->
166 <!--        </dependency>  -->
167         
168                 <dependency>
169             <groupId>org.apache.cxf</groupId>
170             <artifactId>cxf-rt-transports-http</artifactId>
171             <version>3.1.8</version>
172         </dependency> 
173         <!--web service 以下都是cxf必备的--> 
174         <dependency>
175             <groupId>org.apache.cxf</groupId>
176             <artifactId>cxf-rt-transports-http</artifactId>
177             <version>3.1.8</version>
178         </dependency>
179         <!--
180             不加这个包会报错Unable to locate spring NamespaceHandler for XML schema
181             namespace [http://cxf.apache.org/jaxws]
182         -->
183         <dependency>
184             <groupId>org.apache.cxf</groupId>
185             <artifactId>cxf-rt-frontend-jaxws</artifactId>
186             <version>3.1.8</version>
187         </dependency> <!--java实现webservice,不部署到tomcat,需要jetty包支持-->
188         <dependency>
189             <groupId>org.apache.cxf</groupId>
190             <artifactId>cxf-rt-transports-http-jetty</artifactId>
191             <version>3.1.8</version>
192         </dependency>
193         
194     </dependencies>
195 
196 </project>
pom.xml

相关文章: