<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.13</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
数据库
<!-- java-mysql -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.5.3.1</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
jwt
<!-- token-->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>
<!-- 用户密码加密-->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
</dependency>
Spring Cloud? && Spring Cloud Alibaba
<!-- Spring Cloud -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>2021.0.8</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Spring Cloud Alibaba -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>2021.0.5.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- gateway -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
<version>3.1.5</version>
</dependency>
application.yml 文件
?
server:
port: 8091
spring:
main:
allow-bean-definition-overriding: true
# data:
# elasticsearch:
# client:
# reactive:
# endpoints: localhost:9200
# socket-timeout: 15000
# connection-timeout: 10000
# elasticsearch:
# rest:
# uris: localhost:9200
mail:
host: smtp.qq.com
username: 1592555070@qq.com
password: tftpashkqkjbegfa
properties:
mail:
smtp:
ssl:
enable=true:
default-encoding: UTF-8
datasource:
username: root
password: 123456
url: jdbc:mysql://localhost:3306/aurora?useUnicode=true&characterEncoding=utf8
driverClassName: com.mysql.cj.jdbc.Driver
config:
import:
nacos: bootstrap.yml
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
# logic-delete-field: deleted # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2)
# logic-delete-value: 1 # 逻辑已删除值(默认为 1)
# logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
id-type: auto # id 自增
table-prefix: aur_ # 数据库表前缀
type-aliases-package: com.chk.user
mapper-locations: classpath:mapper/*.xml #扫描的 mapper.xml
#兼容bootstrap.yml
?