Jiarenxiang | 25a45b7 | 2025-03-13 16:09:13 +0800 | [diff] [blame] | 1 | package com.ruoyi; |
| 2 | |
崔向南 | 03d21b9 | 2025-06-05 17:42:23 +0800 | [diff] [blame] | 3 | import org.mybatis.spring.annotation.MapperScan; |
Jiarenxiang | 25a45b7 | 2025-03-13 16:09:13 +0800 | [diff] [blame] | 4 | import org.springframework.boot.SpringApplication; |
| 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| 6 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
崔向南 | 03d21b9 | 2025-06-05 17:42:23 +0800 | [diff] [blame] | 7 | import org.springframework.context.annotation.ComponentScan; |
Jiarenxiang | 25a45b7 | 2025-03-13 16:09:13 +0800 | [diff] [blame] | 8 | |
| 9 | /** |
| 10 | * 启动程序 |
| 11 | * |
| 12 | * @author ruoyi |
| 13 | */ |
崔向南 | 03d21b9 | 2025-06-05 17:42:23 +0800 | [diff] [blame] | 14 | @ComponentScan(basePackages = { |
| 15 | "com.ruoyi", |
| 16 | "bounty" // 新增您的包路径 |
| 17 | }) |
| 18 | // 关键添加:扩大MyBatis接口扫描范围 |
| 19 | @MapperScan(basePackages = { |
| 20 | "com.ruoyi.**.mapper", |
| 21 | "bounty.mapper" // 如果bounty下有Mapper接口 |
| 22 | }) |
| 23 | |
Jiarenxiang | 25a45b7 | 2025-03-13 16:09:13 +0800 | [diff] [blame] | 24 | @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) |
Yumaoo | e96c254 | 2025-05-13 17:11:01 +0800 | [diff] [blame] | 25 | public class RuoYiApplication { |
| 26 | public static void main(String[] args) { |
Jiarenxiang | 25a45b7 | 2025-03-13 16:09:13 +0800 | [diff] [blame] | 27 | // System.setProperty("spring.devtools.restart.enabled", "false"); |
| 28 | SpringApplication.run(RuoYiApplication.class, args); |
| 29 | // ANSI escape code for blue text |
| 30 | String blue = "\u001B[34m"; |
| 31 | // ANSI escape code to reset text color |
| 32 | String reset = "\u001B[0m"; |
| 33 | |
Yumaoo | 877388f | 2025-04-10 23:34:09 +0800 | [diff] [blame] | 34 | System.out.println(blue + " ----贾仁翔 喵喵喵" + reset); |
Jiarenxiang | 25a45b7 | 2025-03-13 16:09:13 +0800 | [diff] [blame] | 35 | } |
| 36 | } |