// Path: druid-spring-boot-example/druid-spring-boot-mybatis-example/src/main/java/com/github/trang/druid/example/mybatis/mapper/CityMapper.java
// @Mapper
// public interface CityMapper {
// 
//     @Select("select * from city")
//     List<City> findAll();
// 
//     @Select("select * from city where id = #{id}")
//     City findById(@Param("id") Long id);
// 
// }


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.github.trang.druid.example.mybatis.mapper.CityMapper;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;
package com.github.trang.druid.example.mybatis;




/**
 * DruidSpringBootStarterApplication
 *
 * @author trang
 */
@SpringBootApplication
@MapperScan("com.github.trang.druid.example.mapper")
@Slf4j
public class DruidMybatisApplication implements CommandLineRunner {

    public static void main(String[] args) {
        System.setProperty("druid.logType", "slf4j");
        SpringApplication.run(DruidMybatisApplication.class, args);
    }

    @Autowired
// Path: druid-spring-boot-example/druid-spring-boot-mybatis-example/src/main/java/com/github/trang/druid/example/mybatis/mapper/CityMapper.java
// @Mapper
// public interface CityMapper {
// 
//     @Select("select * from city")
//     List<City> findAll();
// 
//     @Select("select * from city where id = #{id}")
//     City findById(@Param("id") Long id);
// 
// }


// Path: druid-spring-boot-example/druid-spring-boot-mybatis-example/src/main/java/com/github/trang/druid/example/mybatis/DruidMybatisApplication.java
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.github.trang.druid.example.mybatis.mapper.CityMapper;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;

package com.github.trang.druid.example.mybatis;




/**
 * DruidSpringBootStarterApplication
 *
 * @author trang
 */
@SpringBootApplication
@MapperScan("com.github.trang.druid.example.mapper")
@Slf4j
public class DruidMybatisApplication implements CommandLineRunner {

    public static void main(String[] args) {
        System.setProperty("druid.logType", "slf4j");
        SpringApplication.run(DruidMybatisApplication.class, args);
    }

    @Autowired
    private CityMapper cityRepository;