Guest User

Untitled

a guest
Aug 20th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. spring:
  2. application:
  3. name: my-api
  4. datasource:
  5. driver-class-name: org.h2.Driver
  6. url: jdbc:h2:mem:myDB;MODE=MySQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
  7. username: sa
  8. password: sags
  9. liquibase:
  10. enabled: true
  11. user: sa
  12. password: sags
  13. change-log: classpath:/db/changelog/db.changelog-master.xml
  14. jpa:
  15. hibernate:
  16. ddl-auto: none
  17. database-platform: org.hibernate.dialect.H2Dialect
  18. show-sql: true
  19. properties:
  20. hibernate:
  21. use_sql_comments: true
  22. format_sql: true
  23. h2:
  24. console:
  25. enabled: true
  26. path: /console
  27.  
  28. import java.util.List;
  29.  
  30. import org.junit.Test;
  31. import org.junit.runner.RunWith;
  32. import org.springframework.beans.factory.annotation.Autowired;
  33. import org.springframework.boot.test.context.SpringBootTest;
  34. import org.springframework.test.context.junit4.SpringRunner;
  35.  
  36. @RunWith(SpringRunner.class)
  37. @SpringBootTest
  38. public class FooRepositoryTest {
  39.  
  40. @Autowired
  41. private FooRepository fooRepository;
  42.  
  43. @Test
  44. public void findAllMustReturnAnything() {
  45. List<Object> result = fooRepository.tables();
  46. }
  47. }
  48.  
  49. @Query(value = "SHOW TABLES", nativeQuery = true)
  50. List<Object> tables();
Add Comment
Please, Sign In to add comment