Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b5c8da0
Add Docker Compose sample for Doma Spring Boot (#291)
devin-ai-integration[bot] May 19, 2025
492079e
Fix code formatting issues
devin-ai-integration[bot] May 19, 2025
9a54fdc
Update Docker Compose sample to use Spring Boot's built-in Docker Com…
devin-ai-integration[bot] May 19, 2025
f8fca44
Fix code formatting issues
devin-ai-integration[bot] May 19, 2025
22218e7
Address PR feedback: Use Spring Boot Docker Compose support correctly
devin-ai-integration[bot] May 19, 2025
0c1d0e9
Address PR feedback: Remove duplicate properties and auto-detect dialect
devin-ai-integration[bot] May 19, 2025
54abc1d
Address PR feedback: Remove H2 dependency and update README
devin-ai-integration[bot] May 19, 2025
8d4b1e1
Remove openrewrite maven plugin from pom.xml
making May 19, 2025
b833b87
Add TestContainers sample for Doma Spring Boot (#310)
devin-ai-integration[bot] May 19, 2025
c2b2c05
Update Docker Compose sample to match TestContainers sample tests
devin-ai-integration[bot] May 19, 2025
bc628f6
Add schema-test.sql to reset database sequence for tests
devin-ai-integration[bot] May 19, 2025
8f69bac
Merge branch 'master' into devin/1747645402-add-docker-compose-sample
making May 19, 2025
ccbb570
Address PR feedback: Move sequence reset to test code, update logging…
devin-ai-integration[bot] May 19, 2025
0090fb5
Remove test application.properties as it's redundant with main applic…
devin-ai-integration[bot] May 19, 2025
b616f81
Add TestContainers fallback for Docker Compose sample in CI
devin-ai-integration[bot] May 19, 2025
bd35370
Format DockerComposeTestConfiguration.java
devin-ai-integration[bot] May 19, 2025
a68bdde
Revert "Format DockerComposeTestConfiguration.java"
making May 19, 2025
10064a2
Revert "Add TestContainers fallback for Docker Compose sample in CI"
making May 19, 2025
739caf8
update
making May 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ target
.settings
.factorypath
.apt_generated
.vscode/
.vscode/
HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ services:
postgres:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the generated compose.yaml as is

image: 'postgres:latest'
environment:
- 'POSTGRES_DB=${POSTGRES_DB}'
- 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
- 'POSTGRES_USER=${POSTGRES_USER}'
- 'POSTGRES_DB=mydatabase'
- 'POSTGRES_PASSWORD=secret'
- 'POSTGRES_USER=myuser'
ports:
- '5432'
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@

@SpringBootTest
@TestPropertySource(properties = {
"spring.datasource.url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1",
"spring.datasource.username=sa",
"spring.datasource.password=",
"spring.datasource.driver-class-name=org.h2.Driver",
"doma.dialect=H2"
"spring.docker.compose.skip.in-tests=false",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated with application.properties

"doma.dialect=POSTGRES"
})
public class ApplicationTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enable Docker Compose in tests
spring.docker.compose.skip.in-tests=false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove src/test/resources/application.properties. Using src/main/resources/application.properties should be sufficient

doma.dialect=POSTGRES
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doma.dialect should be automatically detected by JdbcConnectionDetails