22301115 | cf6dba2 | 2025-03-25 19:06:21 +0800 | [diff] [blame] | 1 | |
| 2 | package com.example.myproject; |
| 3 | |
| 4 | import org.mybatis.spring.annotation.MapperScan; |
| 5 | import org.springframework.boot.SpringApplication; |
| 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
YelinCui | d81ebf8 | 2025-06-07 15:24:35 +0800 | [diff] [blame^] | 7 | import org.springframework.scheduling.annotation.EnableAsync; |
YelinCui | 09ee07c | 2025-06-07 05:09:55 +0800 | [diff] [blame] | 8 | import org.springframework.scheduling.annotation.EnableScheduling; |
22301115 | cf6dba2 | 2025-03-25 19:06:21 +0800 | [diff] [blame] | 9 | |
| 10 | @SpringBootApplication |
YelinCui | 09ee07c | 2025-06-07 05:09:55 +0800 | [diff] [blame] | 11 | @EnableScheduling |
YelinCui | d81ebf8 | 2025-06-07 15:24:35 +0800 | [diff] [blame^] | 12 | @EnableAsync |
22301115 | cf6dba2 | 2025-03-25 19:06:21 +0800 | [diff] [blame] | 13 | @MapperScan("com.example.myproject.mapper") // 扫描 Mapper 接口 |
| 14 | public class MyProjectApplication { |
| 15 | public static void main(String[] args) { |
| 16 | SpringApplication.run(MyProjectApplication.class, args); |
| 17 | } |
| 18 | } |