Guest User

Untitled

a guest
May 28th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <parent>
  2. <groupId>org.springframework.boot</groupId>
  3. <artifactId>spring-boot-starter-parent</artifactId>
  4. <version>1.5.2.RELEASE</version>
  5. <relativePath/>
  6. </parent>
  7. … to dependency:
  8. <dependency>
  9. <groupId>org.springframework.boot</groupId>
  10. <artifactId>spring-boot-starter-data-jpa</artifactId>
  11. </dependency>
  12.  
  13. public interface DeptRepo extends JpaRepository<Dept, Long> {
  14.  
  15. @Query(value = "select d from dept d where name = 'ACCOUNTING'")
  16. List<Dept> findByAccounting;
  17. }
  18.  
  19. spring.jpa.show_sql=true
  20. spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle12cDialect
  21. spring.datasource.url=jdbc:oracle:thin:@localhost:1521/to2b
  22. spring.datasource.username=scott
  23. spring.datasource.password=tiger
Add Comment
Please, Sign In to add comment