1.创建启动类
在外层目录创建启动类
内容如下
@SpringBootApplication
public class EduApplication {
public static void main(String[] args) {
SpringApplication.run(EduApplication.class, args);
}
}
2.创建配置类,实现扫描mapper
创建conf包和config类,位置如下
内容如下
@Configuration
@MapperScan("com.neusoft.eduservice.mapper")
public class EduConfig {
}
3.运行项目
在启动类运行项目,输入对应路由地址进行测试。
端口号为8001
完整地址为http://localhost:8001/eduservice/teacher/findAll