Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- spring:
- application:
- name: my-api
- datasource:
- driver-class-name: org.h2.Driver
- url: jdbc:h2:mem:myDB;MODE=MySQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
- username: sa
- password: sags
- liquibase:
- enabled: true
- user: sa
- password: sags
- change-log: classpath:/db/changelog/db.changelog-master.xml
- jpa:
- hibernate:
- ddl-auto: none
- database-platform: org.hibernate.dialect.H2Dialect
- show-sql: true
- properties:
- hibernate:
- use_sql_comments: true
- format_sql: true
- h2:
- console:
- enabled: true
- path: /console
- import java.util.List;
- import org.junit.Test;
- import org.junit.runner.RunWith;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.boot.test.context.SpringBootTest;
- import org.springframework.test.context.junit4.SpringRunner;
- @RunWith(SpringRunner.class)
- @SpringBootTest
- public class FooRepositoryTest {
- @Autowired
- private FooRepository fooRepository;
- @Test
- public void findAllMustReturnAnything() {
- List<Object> result = fooRepository.tables();
- }
- }
- @Query(value = "SHOW TABLES", nativeQuery = true)
- List<Object> tables();
Add Comment
Please, Sign In to add comment