Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <parent>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-parent</artifactId>
- <version>1.5.2.RELEASE</version>
- <relativePath/>
- </parent>
- … to dependency:
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- public interface DeptRepo extends JpaRepository<Dept, Long> {
- @Query(value = "select d from dept d where name = 'ACCOUNTING'")
- List<Dept> findByAccounting;
- }
- spring.jpa.show_sql=true
- spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle12cDialect
- spring.datasource.url=jdbc:oracle:thin:@localhost:1521/to2b
- spring.datasource.username=scott
- spring.datasource.password=tiger
Add Comment
Please, Sign In to add comment