@ActiveProfiles("test")가 작동하지 않은 이유
Table "MEMBER" not found (this database is empty); SQL statement라는 에러메세지가 나오면서 기존에 문제 없었던 테스트가 돌아가지 않아 처음에는 단순히 패키지 구조가 바뀌어서 안되는줄 알았다. 알고보니 @ActiveProfiles("test") 의 의미를 좀 더 생각했더라면 해결할 수 있는 문제였다. @ActiveProfiles("test") 는 application-test.yml 만을 실행하겠다는 것이 아니라 test profile로 하겠다는 의미이다. spring: jpa: hibernate: ddl-auto: update properties: hibernate: show_sql: true format_sql: true use_sql_comments:..
웹개발/Spring Boot
2023. 6. 5. 02:18