I have myBatis xml config SqlMapConfig.xml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE configuration
PUBLIC '-//mybatis.org//DTD Config 3.0//EN'
'http://mybatis.org/dtd/mybatis-3-config.dtd'>
<configuration>
<!--<typeAliases>-->
<!--<typeAlias alias = "class_alias_Name" type = "absolute_clas_Name"/>-->
<!--</typeAliases>-->
<environments default = "development">
<environment id = "development">
<transactionManager type = "JDBC"/>
<dataSource type = "POOLED">
<property name = "driver" value = "oracle.jdbc.driver.OracleDriver"/>
<property name = "url" value = "jdbc:oracle:thin:@my_ip:port/dbname"/>
<property name = "username" value = "username"/>
<property name = "password" value = "password"/>
</dataSource>
</environment>
</environments>
<!--<mappers>-->
<!--<mapper resource = "path of the configuration XML file"/>-->
<!--</mappers>-->
</configuration>
I have dependency
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
I have Repository
@Mapper
public interface ImsiByMsisdnModelRepository {
final String query = "....";
@Select(query )
@Results(value = {
@Result(property = "msisdn", column = "MSISDN"),
@Result(property = "terminalid", column = "TERMINALID"),
@Result(property = "startDate", column = "START_DATE"),
@Result(property = "endDate", column = "END_DATE"),
})
List<ImsiByMsisdnModel> getAll(@Param("msisdn") String msisdn);
}
But when I tried build priject I get error
Description:
Cannot determine embedded database driver class for database type NONE
Action:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
Hov can I setup SqlMapConfig.xml
?
I tried write in application.properties
line
mybatis.config-location=
but I do not know which path write. SqlMapConfig.xml
placed in resources