mirror of
https://github.com/JeffLi1993/springboot-learning-example.git
synced 2026-03-14 14:13:52 +08:00
Springboot 整合 Mybatis 的完整 Web 案例
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package org.spring.springboot;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.spring.springboot.dao.CityDao;
|
||||
import org.spring.springboot.domain.City;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Spring Boot 应用启动类
|
||||
*
|
||||
* Created by bysocket on 16/4/26.
|
||||
*/
|
||||
// Spring Boot 应用的标识
|
||||
@SpringBootApplication
|
||||
@MapperScan("org.spring.springboot.dao")
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// 程序启动入口
|
||||
// 启动嵌入式的 Tomcat 并初始化 Spring 环境及其各 Spring 组件
|
||||
SpringApplication.run(Application.class,args);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user