Skip to content

Commit

Permalink
temp rebase later
Browse files Browse the repository at this point in the history
  • Loading branch information
leung018 committed Dec 12, 2024
1 parent a1e0425 commit 9b3a279
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'com.h2database:h2' // TODO: Use it in test while use postgres in production
// implementation 'com.h2database:h2' // TODO: Use it in test while use postgres in production
runtimeOnly 'org.postgresql:postgresql'
implementation "org.springframework.boot:spring-boot-starter-security"
implementation 'io.jsonwebtoken:jjwt-api:0.12.6'
implementation "com.google.guava:guava:33.3.1-jre"
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
postgres:
image: postgres:17.2-alpine
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=password
- POSTGRES_DB=db
ports:
- "5432:5432"
4 changes: 4 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
spring.application.name=spring-simple-backend
spring.datasource.url=jdbc:postgresql://${POSTGRES_URL:localhost}:${POSTGRES_PORT:5432}/${POSTGRES_DB:db}
spring.datasource.username=${POSTGRES_USER:admin}
spring.datasource.password=${POSTGRES_PASSWORD:password}
spring.datasource.driver-class-name=org.postgresql.Driver
jwt.hs256Key=${JWT_HS256_KEY:your-default-key-1234567890abcdef}
jwt.expiredDuration=1h

0 comments on commit 9b3a279

Please sign in to comment.