1. 마이바티스를 사용하는 순서는?
<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.4</version> </dependency>
mybatis.mapper-locations=mappers/**/*.xml
@Mapper public interface NewMapper { @Select("select string from table") public String getString(); }
2. 아래 @를 설명하시오.
@Mapper
: Let the interface interact with sql easily.@MapperScan
: Scan defined packages and picks up the interfaces using any of the mapper annotataions.