| | |
| | | * 禁止 父方法使用 @Transactional 创建事务 子方法使用 @DataSource 切换数据源 |
| | | * 正确用法: 子方法单独创建事务 或 父方法使用 @Transactional(propagation = Propagation.REQUIRES_NEW) 为所有子方法创建新事务 |
| | | |
| | | 关于如何使用Tomcat |
| | | * 查看ruoyi-framework模块的pom.xml文件,根据注释更改依赖 |
| | | * 查看ruoyi-admin模块中的application.yml文件,根据注释更改配置 |
| | | |
| | | ## 修改RuoYi功能 |
| | | |
| | | * ORM框架 使用 Mybatis-Plus 简化CRUD |
| | |
| | | servlet: |
| | | # 应用的访问路径 |
| | | context-path: / |
| | | # undertow 配置 |
| | | undertow: |
| | | # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的 |
| | | max-http-post-size: -1 |
| | |
| | | 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: |
| | |
| | |
|
| | | <dependencies>
|
| | |
|
| | | <!-- BEGIN 如果想使用 Tomcat 注释掉以下代码 -->
|
| | | <!-- SpringBoot Web容器 -->
|
| | | <dependency>
|
| | | <groupId>org.springframework.boot</groupId>
|
| | |
| | | </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>
|