Spring Boot 整合 Mybatis Annotation 注解的完整 Web 案例

This commit is contained in:
JeffLi1993
2017-05-11 18:26:34 +08:00
committed by liqiangqiang
parent 0125485aa9
commit 942f0f58c4
5 changed files with 7 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ import org.spring.springboot.domain.City;
*
* Created by xchunzhao on 02/05/2017.
*/
@Mapper
@Mapper // 标志为 Mybatis 的 Mapper
public interface CityDao {
/**
@@ -17,6 +17,7 @@ public interface CityDao {
* @param cityName 城市名
*/
@Select("SELECT * FROM city")
// 返回 Map 结果集
@Results({
@Result(property = "id", column = "id"),
@Result(property = "provinceId", column = "province_id"),