liding
2025-05-07 083b6b602113a19cba898d097c70fe51435bbe12
配置
已修改4个文件
30 ■■■■ 文件已修改
src/main/java/com/ruoyi/RuoYiApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/basic/controller/CustomerController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-druid.yml 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/RuoYiApplication.java
@@ -1,8 +1,11 @@
package com.ruoyi;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
 * 启动程序
@@ -10,6 +13,7 @@
 * @author ruoyi
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@MapperScan("com.ruoyi.basic.mapper")
public class RuoYiApplication
{
    public static void main(String[] args)
src/main/java/com/ruoyi/basic/controller/CustomerController.java
@@ -5,6 +5,7 @@
import com.ruoyi.basic.pojo.Customer;
import com.ruoyi.basic.service.ICustomerService;
import lombok.AllArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -30,6 +31,7 @@
 */
@RestController
@RequestMapping("/system/customer")
@AllArgsConstructor
public class CustomerController extends BaseController
{
    @Autowired
src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.basic.mapper.CustomerMapper;
import com.ruoyi.basic.pojo.Customer;
import com.ruoyi.basic.service.ICustomerService;
src/main/resources/application-druid.yml
@@ -13,9 +13,9 @@
            slave:
                # 从数据源开关/默认关闭
                enabled: false
                url:
                username:
                password:
                url:
                username:
                password:
            # 初始连接数
            initialSize: 5
            # 最小连接池数量
@@ -39,7 +39,7 @@
            testWhileIdle: true
            testOnBorrow: false
            testOnReturn: false
            webStatFilter:
            webStatFilter:
                enabled: true
            statViewServlet:
                enabled: true
@@ -58,4 +58,17 @@
                    merge-sql: true
                wall:
                    config:
                        multi-statement-allow: true
                        multi-statement-allow: true
# mybatis-plus配置
mybatis-plus:
    mapper-locations: classpath*:mapper/**/*Mapper.xml
    type-aliases-package: com.ruoyi.**.domain
    global-config:
        banner: off
        db-config:
            id-type: auto
    configuration:
        map-underscore-to-camel-case: true
        cache-enabled: false
        log-impl: # org.apache.ibatis.logging.stdout.StdOutImpl