匯總 Spring Boot 常用的依賴
1、web
用于web開發(fā)場景,包含了 RESTful 和 Spring MVC,并且默認使用了內置的Tomcat。
org.springframework.boot spring-boot-starter-web
2、aop
使用 Spring AOP 和 AspectJ 的面向切面編程場景。
org.springframework.boot spring-boot-starter-aop
3、thymeleaf
thymeleaf 是一個很強大的
視圖解析
工具。
org.springframework.boot spring-boot-starter-thymeleaf
4、test
用于測試,提供了多個測試庫,包括 JUnit Jupiter、Hamcrest 和 Mockito。
org.springframework.boot spring-boot-starter-test
5、security
org.springframework.boot spring-boot-starter-security
二、DB 相關1、mybatis
org.mybatis.spring.boot mybatis-spring-boot-starter 2.2.2 com.baomidou mybatis-plus-boot-starter 3.4.3.4
2、jdbc
org.springframework.boot spring-boot-starter-jdbc
3、mysql
mysql mysql-connector-java runtime
4、redis
org.springframework.boot spring-boot-starter-data-redis org.redisson redisson 3.16.6
5、mongodb
org.springframework.boot spring-boot-starter-data-mongodb
三、輔助依賴1、lombok
org.projectlombok lombok true
2、swagger
io.springfox springfox-swagger-ui 2.9.2 io.springfox springfox-swagger2 2.9.2
3、log
org.springframework.boot spring-boot-starter-logging
4、mail
org.springframework.boot spring-boot-starter-mail
5、commons-lang3
commons-lang3是一個小而全的Java工具類庫,類里面有很多對
時間、數(shù)組、數(shù)字、字符串
等的處理。
org.apache.commons commons-lang3 3.12.0
6、guava
com.google.guava guava 22.0
7、aviator
com.googlecode.aviator aviator 5.2.1
8、codec
md5加密…
commons-codec commons-c 1.11
四、配置文件application.properties 配置文件的內容
spring.datasource.url = jdbc:mysql://IP地址:數(shù)據(jù)庫端口號/數(shù)據(jù)庫名稱?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.datasource.username = 數(shù)據(jù)庫登陸用戶
spring.datasource.password = 登陸密碼
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
server.port=9990 #項目啟動后的端口號,springboot自帶tomcat容器
mybatis.mapper-locations: classpath*:mapper/*.xml #掃描mapper文件也就是mybatis映射的文件
你是否還在尋找穩(wěn)定的海外服務器提供商?創(chuàng)新互聯(lián)www.cdcxhl.cn海外機房具備T級流量清洗系統(tǒng)配攻擊溯源,準確流量調度確保服務器高可用性,企業(yè)級服務器適合批量采購,新人活動首月15元起,快前往官網(wǎng)查看詳情吧