-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d831f6
commit d498005
Showing
4 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...bernate2ndlevelcache-sample/src/test/java/com/example/hibernatecache/TestApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.example.hibernatecache; | ||
|
||
import com.example.hibernatecache.common.TestContainersConfig; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.test.context.TestConfiguration; | ||
import org.springframework.boot.testcontainers.context.ImportTestcontainers; | ||
|
||
@TestConfiguration(proxyBeanMethods = false) | ||
@ImportTestcontainers(TestContainersConfig.class) | ||
class TestApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.from(Application::main).with(TestApplication.class).run(args); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...velcache-sample/src/test/java/com/example/hibernatecache/common/TestContainersConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.example.hibernatecache.common; | ||
|
||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; | ||
import org.testcontainers.containers.PostgreSQLContainer; | ||
|
||
public interface TestContainersConfig { | ||
|
||
@ServiceConnection | ||
PostgreSQLContainer<?> postgreSQLContainer = new PostgreSQLContainer<>("postgres:16.0-alpine"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters