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; |
| 7 | |
YelinCui | fdf4ed7 | 2025-05-26 11:49:36 +0800 | [diff] [blame^] | 8 | |
| 9 | |
22301115 | cf6dba2 | 2025-03-25 19:06:21 +0800 | [diff] [blame] | 10 | @SpringBootApplication |
| 11 | @MapperScan("com.example.myproject.mapper") // 扫描 Mapper 接口 |
YelinCui | fdf4ed7 | 2025-05-26 11:49:36 +0800 | [diff] [blame^] | 12 | |
22301115 | cf6dba2 | 2025-03-25 19:06:21 +0800 | [diff] [blame] | 13 | public class MyProjectApplication { |
| 14 | public static void main(String[] args) { |
| 15 | SpringApplication.run(MyProjectApplication.class, args); |
| 16 | } |
| 17 | } |
YelinCui | fdf4ed7 | 2025-05-26 11:49:36 +0800 | [diff] [blame^] | 18 | |