Spring+SpringMVC+Hibernate

  1 <properties>
  2         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  3         <hibernate.version>4.3.6.Final</hibernate.version>
  4         <spring.version>4.1.2.RELEASE</spring.version>
  5         <junit.version>4.12</junit.version>
  6     </properties>
  7     
  8     <dependencies>
  9     
 10         <!-- junit config -->
 11         <dependency>
 12             <groupId>junit</groupId>
 13             <artifactId>junit</artifactId>
 14             <version>${junit.version}</version>
 15             <scope>test</scope>
 16         </dependency>
 17         <!-- junit end -->
 18     
 19         <!-- spring config -->
 20         <dependency>
 21             <groupId>org.springframework</groupId>
 22             <artifactId>spring-aop</artifactId>
 23             <version>${spring.version}</version>
 24         </dependency>
 25         <dependency>
 26             <groupId>org.springframework</groupId>
 27             <artifactId>spring-beans</artifactId>
 28             <version>${spring.version}</version>
 29         </dependency>
 30         <dependency>
 31             <groupId>org.springframework</groupId>
 32             <artifactId>spring-context</artifactId>
 33             <version>${spring.version}</version>
 34         </dependency>
 35         <dependency>
 36             <groupId>org.springframework</groupId>
 37             <artifactId>spring-context-support</artifactId>
 38             <version>${spring.version}</version>
 39         </dependency>
 40         <dependency>
 41             <groupId>org.springframework</groupId>
 42             <artifactId>spring-core</artifactId>
 43             <version>${spring.version}</version>
 44         </dependency>
 45         <dependency>
 46             <groupId>org.springframework</groupId>
 47             <artifactId>spring-expression</artifactId>
 48             <version>${spring.version}</version>
 49         </dependency>
 50         <dependency>
 51             <groupId>org.springframework</groupId>
 52             <artifactId>spring-jdbc</artifactId>
 53             <version>${spring.version}</version>
 54         </dependency>
 55         <dependency>
 56             <groupId>org.springframework</groupId>
 57             <artifactId>spring-orm</artifactId>
 58             <version>${spring.version}</version>
 59         </dependency>
 60         <dependency>
 61             <groupId>org.springframework</groupId>
 62             <artifactId>spring-tx</artifactId>
 63             <version>${spring.version}</version>
 64         </dependency>
 65         <dependency>
 66             <groupId>org.springframework</groupId>
 67             <artifactId>spring-web</artifactId>
 68             <version>${spring.version}</version>
 69         </dependency>
 70         <dependency>
 71             <groupId>org.springframework</groupId>
 72             <artifactId>spring-webmvc</artifactId>
 73             <version>${spring.version}</version>
 74         </dependency>
 75         <dependency>
 76             <groupId>org.springframework</groupId>
 77             <artifactId>spring-test</artifactId>
 78             <version>${spring.version}</version>
 79         </dependency>
 80         <!-- spring config end -->
 81         
 82         <!-- hibernate config -->
 83         <dependency>
 84             <groupId>org.hibernate</groupId>
 85             <artifactId>hibernate-core</artifactId>
 86             <version>${hibernate.version}</version>
 87         </dependency>
 88         <dependency>
 89             <groupId>org.hibernate</groupId>
 90             <artifactId>hibernate-entitymanager</artifactId>
 91             <version>${hibernate.version}</version>
 92         </dependency>
 93         <dependency>
 94             <groupId>org.hibernate.javax.persistence</groupId>
 95             <artifactId>hibernate-jpa-2.1-api</artifactId>
 96             <version>1.0.0.Final</version>
 97         </dependency>
 98         <dependency>
 99             <groupId>org.hibernate.common</groupId>
100             <artifactId>hibernate-commons-annotations</artifactId>
101             <version>4.0.5.Final</version>
102         </dependency>
103         <!-- hibernate config end -->
104         
105         <!-- c3p0 config -->
106         <dependency>
107             <groupId>c3p0</groupId>
108             <artifactId>c3p0</artifactId>
109             <version>0.9.1.2</version>
110         </dependency>
111         <!-- c3p0 end -->
112         
113         <!-- mysql config -->
114         <dependency>
115             <groupId>mysql</groupId>
116             <artifactId>mysql-connector-java</artifactId>
117             <version>5.1.33</version>
118         </dependency>
119         <!-- mysql end -->
120         
121         <!-- logger config -->
122         <dependency>
123             <groupId>org.slf4j</groupId>
124             <artifactId>slf4j-api</artifactId>
125             <version>1.7.9</version>
126         </dependency>
127         <dependency>
128             <groupId>org.slf4j</groupId>
129             <artifactId>slf4j-log4j12</artifactId>
130             <version>1.7.9</version>
131         </dependency>
132         <!-- logger config end -->
133         
134         <!-- jackson config -->
135         <dependency>
136             <groupId>com.fasterxml.jackson.core</groupId>
137             <artifactId>jackson-annotations</artifactId>
138             <version>2.2.3</version>
139         </dependency>
140         <dependency>
141             <groupId>com.fasterxml.jackson.core</groupId>
142             <artifactId>jackson-core</artifactId>
143             <version>2.2.3</version>
144         </dependency>
145         <dependency>
146             <groupId>com.fasterxml.jackson.core</groupId>
147             <artifactId>jackson-databind</artifactId>
148             <version>2.2.3</version>
149         </dependency>
150         <!-- jackson end -->
151         
152         <!-- servlet config -->
153         <dependency>
154             <groupId>javax.servlet</groupId>
155             <artifactId>javax.servlet-api</artifactId>
156             <version>3.1.0</version>
157             <scope>provided</scope>
158         </dependency>
159         <dependency>
160             <groupId>javax.servlet.jsp</groupId>
161             <artifactId>jsp-api</artifactId>
162             <version>2.1</version>
163             <scope>provided</scope>
164         </dependency>
165         <dependency>
166             <groupId>jstl</groupId>
167             <artifactId>jstl</artifactId>
168             <version>1.2</version>
169         </dependency>
170         <!-- servlet end -->
171         
172         <!-- AOP config -->
173         <dependency>
174             <groupId>aopalliance</groupId>
175             <artifactId>aopalliance</artifactId>
176             <version>1.0</version>
177         </dependency>
178         <dependency>
179             <groupId>org.aspectj</groupId>
180             <artifactId>aspectjrt</artifactId>
181             <version>1.8.4</version>
182         </dependency>
183         <dependency>
184             <groupId>org.aspectj</groupId>
185             <artifactId>aspectjweaver</artifactId>
186             <version>1.8.4</version>
187         </dependency>
188         <!-- AOP end -->
189         
190         <!-- commons config -->
191         <dependency>
192             <groupId>commons-logging</groupId>
193             <artifactId>commons-logging</artifactId>
194             <version>1.2</version>
195         </dependency>
196         <dependency>
197             <groupId>org.apache.commons</groupId>
198             <artifactId>commons-lang3</artifactId>
199             <version>3.5</version>
200         </dependency>
201         <dependency>
202             <groupId>commons-fileupload</groupId>
203             <artifactId>commons-fileupload</artifactId>
204             <version>1.2.2</version>
205         </dependency>
206         <!-- commons end -->
207         
208         <dependency>
209             <groupId>net.sf.json-lib</groupId>
210             <artifactId>json-lib</artifactId>
211             <version>2.4</version>
212             <classifier>jdk15</classifier>
213         </dependency>
214     </dependencies>
215     
216     <build>
217         <finalName>dr_hibernate_comms</finalName>
218         <plugins>
219             <plugin>
220                 <groupId>org.apache.tomcat.maven</groupId>
221                 <artifactId>tomcat7-maven-plugin</artifactId>
222                 <configuration>
223                     <port>9001</port>
224                     <path>/hibernate</path>
225                     <uriEncoding>UTF-8</uriEncoding>
226                 </configuration>
227             </plugin>
228             <plugin>
229                 <groupId>org.apache.maven.plugins</groupId>
230                 <artifactId>maven-compiler-plugin</artifactId>
231                 <version>3.1</version>
232                 <configuration>
233                     <source>1.7</source>
234                     <target>1.7</target>
235                 </configuration>
236             </plugin>
237         </plugins>
238     </build>
原文地址:https://www.cnblogs.com/a591378955/p/8274552.html