更新 如何修改为Tomcat相关注释配置与说明

This commit is contained in:
疯狂的狮子li 2020-12-08 16:21:30 +08:00
parent 69f30760f8
commit 5a62019cdd
3 changed files with 22 additions and 1 deletions

View File

@ -5,6 +5,10 @@
* 禁止 父方法使用 @Transactional 创建事务 子方法使用 @DataSource 切换数据源
* 正确用法: 子方法单独创建事务 或 父方法使用 @Transactional(propagation = Propagation.REQUIRES_NEW) 为所有子方法创建新事务
关于如何使用Tomcat
* 查看ruoyi-framework模块的pom.xml文件,根据注释更改依赖
* 查看ruoyi-admin模块中的application.yml文件,根据注释更改配置
## 修改RuoYi功能
* ORM框架 使用 Mybatis-Plus 简化CRUD

View File

@ -22,6 +22,7 @@ server:
servlet:
# 应用的访问路径
context-path: /
# undertow 配置
undertow:
# HTTP post内容的最大大小。当值为-1时默认值为大小是无限的
max-http-post-size: -1
@ -34,6 +35,14 @@ server:
worker-threads: 256
# 是否分配的直接内存
direct-buffers: true
# # tomcat 配置
# tomcat:
# # tomcat的URI编码
# uri-encoding: UTF-8
# # tomcat最大线程数默认为200
# max-threads: 500
# # Tomcat启动初始化的线程数默认值25
# min-spare-threads: 30
# 日志配置
logging:

View File

@ -17,6 +17,7 @@
<dependencies>
<!-- BEGIN 如果想使用 Tomcat 注释掉以下代码 -->
<!-- SpringBoot Web容器 -->
<dependency>
<groupId>org.springframework.boot</groupId>
@ -28,12 +29,19 @@
</exclusion>
</exclusions>
</dependency>
<!-- web 容器使用 undertow 性能更强 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<!-- END -->
<!-- BEGIN 如果想使用 Tomcat 解除以下代码注释 -->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-web</artifactId>-->
<!-- </dependency>-->
<!-- END -->
<!-- SpringBoot 拦截器 -->
<dependency>