Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. <?xml version='1.0' encoding='UTF-8' ?>
  2. <!DOCTYPE configuration
  3. PUBLIC '-//mybatis.org//DTD Config 3.0//EN'
  4. 'http://mybatis.org/dtd/mybatis-3-config.dtd'>
  5.  
  6. <configuration>
  7.  
  8. <!--<typeAliases>-->
  9. <!--<typeAlias alias = "class_alias_Name" type = "absolute_clas_Name"/>-->
  10. <!--</typeAliases>-->
  11.  
  12. <environments default = "development">
  13. <environment id = "development">
  14. <transactionManager type = "JDBC"/>
  15.  
  16. <dataSource type = "POOLED">
  17. <property name = "driver" value = "oracle.jdbc.driver.OracleDriver"/>
  18. <property name = "url" value = "jdbc:oracle:thin:@my_ip:port/dbname"/>
  19. <property name = "username" value = "username"/>
  20. <property name = "password" value = "password"/>
  21. </dataSource>
  22.  
  23. </environment>
  24. </environments>
  25.  
  26. <!--<mappers>-->
  27. <!--<mapper resource = "path of the configuration XML file"/>-->
  28. <!--</mappers>-->
  29.  
  30. </configuration>
  31.  
  32. <dependency>
  33. <groupId>org.mybatis.spring.boot</groupId>
  34. <artifactId>mybatis-spring-boot-starter</artifactId>
  35. <version>1.1.1</version>
  36. </dependency>
  37.  
  38. @Mapper
  39. public interface ImsiByMsisdnModelRepository {
  40.  
  41. final String query = "....";
  42.  
  43. @Select(query )
  44. @Results(value = {
  45. @Result(property = "msisdn", column = "MSISDN"),
  46. @Result(property = "terminalid", column = "TERMINALID"),
  47. @Result(property = "startDate", column = "START_DATE"),
  48. @Result(property = "endDate", column = "END_DATE"),
  49. })
  50. List<ImsiByMsisdnModel> getAll(@Param("msisdn") String msisdn);
  51. }
  52.  
  53. mybatis.config-location=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement