赞
踩
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>5.2.13.RELEASE</version>
- </dependency>
spring-aspects依赖包
作用:spring整合AspectJ框架,提供aop注解(@Aspect、@Pointcut、@Before、@AfterReturning、@Around、@AfterThrowing、@After)
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aspects</artifactId>
- <version>5.2.13.RELEASE</version>
- </dependency>
Spring核心依赖包spring-context
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>5.2.13.RELEASE</version>
- </dependency>
mysql-connector-java
作用:引入驱动器Driver(com.mysql.cj.jdbc.Driver)
注意:使用8.0.23版本,不能使用8.0.22版本(有bug)
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>8.0.23</version>
- </dependency>
spring-jdbc
作用:使用JdbcTemplate操作数据库、事务注解、注解管理
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-jdbc</artifactId>
- <version>5.2.13.RELEASE</version>
- <scope>test</scope>
- </dependency>
- <!--spring-mvc依赖-->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>5.2.13.RELEASE</version>
- </dependency>
- <!--mvc底层是servlet,必须添加servlet依赖-->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>4.0.1</version>
- <!--provided(编译时有效,打包时不会打包在war包中)-->
- <scope>provided</scope>
- </dependency>
- <!--当返回类型是对象时,需要使用@ResponseBody 注解,将转换后的 JSON 数据放入到响应体中。-->
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- <version>2.9.0</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>2.9.0</version>
- </dependency>
③文件上传
- <!--文件上传-->
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>1.3.1</version>
- </dependency>
- <dependency>
- <groupId>org.mybatis</groupId>
- <artifactId>mybatis</artifactId>
- <version>3.5.6</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.17</version>
- </dependency>
作用:提供@Configuration、@Bean注解
- <parent>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-parent</artifactId>
- <version>2.1.2.RELEASE</version>
- </parent>
作用:创建Web工程使用
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
作用:SpringBoot整合Jdbc
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-jdbc</artifactId>
- </dependency>
作用:SpringBoot测试依赖,配合@RunWith(SpringRunner.class)和@SpringBootTest使用
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- </dependency>
作用:SpringBoot整合thymeleaf
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-thymeleaf</artifactId>
- </dependency>
作用:有了这个布局框架,你可以专注于body体的内容,不在纠结与left header footer 公共js css
- <dependency>
- <groupId>nz.net.ultraq.thymeleaf</groupId>
- <artifactId>thymeleaf-layout-dialect</artifactId>
- </dependency>
作用:SpringBoot整合Mybatis,提供@Mapper,@MapperScan注解
- <dependency>
- <groupId>org.mybatis.spring.boot</groupId>
- <artifactId>mybatis-spring-boot-starter</artifactId>
- <version>1.3.2</version>
- </dependency>
-
⑧mapper-spring-boot-starter
作用:SpringBoot整合tk-Mybatis,自动引入mybatis-spring-boot-starter依赖,提供@Table、@Id、@GeneratedValue、@Column、@Transient、@MapperScan注解
- <dependency>
- <groupId>tk.mybatis</groupId>
- <artifactId>mapper-spring-boot-starter</artifactId>
- <version>2.0.2</version>
- </dependency>
作用:SpringBoot整合Mybatis Plus,自动引入mybatis-spring-boot-starter依赖,提供@TableName、@TableId、@TableField注解
- <dependency>
- <groupId>com.baomidou</groupId>
- <artifactId>mybatis-plus-boot-starter</artifactId>
- <version>3.3.2</version>
- </dependency>
作用:简化实体类开发,免写get/set方法和toString方法,提供@Data、@Accessors注解
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- <version>1.18.22</version>
- <scope>provided</scope>
- </dependency>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。