2、springboot+mybatis+ajax+pageHelper+idea+maven(全套增删改查)

2、springboot+mybatis+ajax+pageHelper+idea+maven(全套增删改查)

0.构建项目

 

 

 

 

 

 

1、项目结构如下

 

 2、编辑pom.xml文件配置依赖

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 4     <modelVersion>4.0.0</modelVersion>
 5     <parent>
 6         <groupId>org.springframework.boot</groupId>
 7         <artifactId>spring-boot-starter-parent</artifactId>
 8         <version>2.7.3</version>
 9         <relativePath/> <!-- lookup parent from repository -->
10     </parent>
11     <groupId>com</groupId>
12     <artifactId>sbmxmlday5002</artifactId>
13     <version>0.0.1-SNAPSHOT</version>
14     <name>sbmxmlday5002</name>
15     <description>Demo project for Spring Boot</description>
16     <properties>
17         <java.version>1.8</java.version>
18     </properties>
19 
20     <dependencies>
21         <dependency>
22             <groupId>org.springframework.boot</groupId>
23             <artifactId>spring-boot-starter-jdbc</artifactId>
24         </dependency>
25         <dependency>
26             <groupId>org.springframework.boot</groupId>
27             <artifactId>spring-boot-starter-web</artifactId>
28         </dependency>
29         <dependency>
30             <groupId>org.mybatis.spring.boot</groupId>
31             <artifactId>mybatis-spring-boot-starter</artifactId>
32             <version>2.2.2</version>
33         </dependency>
34 
35         <dependency>
36             <groupId>mysql</groupId>
37             <artifactId>mysql-connector-java</artifactId>
38             <version>5.1.38</version>
39         </dependency>
40 
41         <!--spring boot 分页查询,需要手动配置 必须是1.4.1-->
42         <!-- pagehelper -->
43         <dependency>
44             <groupId>com.github.pagehelper</groupId>
45             <artifactId>pagehelper-spring-boot-starter</artifactId>
46             <version>1.4.1</version>
47         </dependency>
48 
49         <dependency>
50             <groupId>org.springframework.boot</groupId>
51             <artifactId>spring-boot-starter-test</artifactId>
52             <scope>test</scope>
53         </dependency>
54 
55     </dependencies>
56 
57     <build>
58         <plugins>
59             <plugin>
60                 <groupId>org.springframework.boot</groupId>
61                 <artifactId>spring-boot-maven-plugin</artifactId>
62             </plugin>
63         </plugins>
64     </build>
65 
66 </project>
hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » 2、springboot+mybatis+ajax+pageHelper+idea+maven(全套增删改查)