阅读背景:

SSM框架环境搭建,依赖以及配置详解_布先生_ssm框架依赖

来源:互联网 

一、环境搭建

1.导依赖

<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.yooyo</groupId>
  <artifactId>SpringAopDemo</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <dependencies>
<!-- Spring -->
	<!-- springIOC的相关依赖包括core、context、beans、expression。
		 springAOP的相关依赖
		 springMVC的相关依赖
		 spring整合web的依赖
		 引入这一个就足够了 -->
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-webmvc</artifactId>
  		<version>5.1.3.RELEASE</version>
  	</dependency>
  	<!-- aop联盟,提供了aop规范,Spring AOP就是实现了这个规范 -->
  	<dependency>
  		<groupId>aopalliance</groupId>
  		<artifactId>aopalliance</artifactId>
  		<version>1.0</version>
  	</dependency>
  	<!-- aspectj,实现了aop规范,比spring AOP实现的使用起来简单,所以引入它 -->
  	<dependency>
  		<groupId>org.aspectj</groupId>
  		<artifactId>aspectjweaver</artifactId>
  		<version>1.9.2</version>
  	</dependency>
  	<!-- 集成aspectjweaver -->
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-aspects</artifactId>
  		<version>5.1.3.RELEASE</version>
  	</dependency>
  	<!--spring集成测试  -->
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-test</artifactId>
  		<version>5.1.3.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>junit</groupId>
  		<artifactId>junit</artifactId>
  		<version>4.12</version>
  	</dependency>
<!-- mybatis -->
	<!-- mysql数据库驱动,以及使用的数据源 -->
  	<dependency>
  		<groupId>mysql</groupId>
  		<artifactId>mysql-connector-java</artifactId>
  		<version>5.1.46</version>
  	</dependency>
  	<dependency>
  		<groupId>com.mchange</groupId>
  		<artifactId>c3p0</artifactId>
  		<version>0.9.5.2</version>
  	</dependency>
  	<!-- mybatis依赖,spring对jdbc的支持,spring集成mybatis以及对事务的支持 -->
  	<dependency>
  		<groupId>org.mybatis</groupId>
  		<artifactId>mybatis</artifactId>
  		<version>3.4.5</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-jdbc</artifactId>
  		<version>5.1.3.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>org.mybatis</groupId>
  		<artifactId>mybatis-spring</artifactId>
  		<version>1.3.1</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-tx</artifactId>
  		<version>5.1.3.RELEASE</version>
  	</dependency>
  </dependencies>
</project>
<project xmlns="https:/



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: