使⽤IDEA搭建ssm框架的详细图⽂教程ssm(spring springMVC mybatis)
1.创建项⽬
file->new->project
2.新建的maven项⽬⽬录结构
添加ssm需要的⽂件夹等
如果去掉java⽂件夹的蓝⾊标志,会发现这⾥new时不能创建java类或包
如果main/java前不是蓝⾊⽂件夹或test/java前不是绿⾊⽂件夹,可以这样添加
3.加⼊maven依赖
springboot aop<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="/POM/4.0.0" xmlns:xsi="/2001/XMLSchema-instance" xsi:schemaLocation="/POM/4.0.0 /xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId&le</groupId>
<artifactId>ssm3</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>ssm3 Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>ample</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mavenpiler.source>1.7</mavenpiler.source>
<mavenpiler.target>1.7</mavenpiler.target>
<jackson.version>2.5.4</jackson.version>
</properties>
<dependencies>
<!-- controller返回json -->
<dependency>
<groupId>com.</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- 引⼊spring mvc的jar包 -->
<!-- mvnrepository/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.7.RELEASE</version>
</dependency>
<!-- JDBC⽀持包,包括数据源设置和JDBC访问⽀持 -->
<!-- mvnrepository/artifact/org.springframework/spring-jdbc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>4.3.7.RELEASE</version>
</dependency>
<!-- Spring提供对AspectJ框架的整合 -->
<!-- mvnrepository/artifact/org.springframework/spring-aspects -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>4.3.7.RELEASE</version>
</dependency>
<!-- mybatis依赖包 -->
<!-- mvnrepository/batis/mybatis -->
<dependency>
<groupId&batis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.2</version>
</dependency>
<!-- mybatis引⼊spring适配包 -->
<!-- mvnrepository/batis/mybatis-spring -->
<dependency>
<groupId&batis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.1</version>
</dependency>
<!-- 数据库连接池 c3p0 -->

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。