Skip to content

Commit b7de2e9

Browse files
committed
security again
1 parent 0f663dd commit b7de2e9

File tree

4 files changed

+51
-20
lines changed

4 files changed

+51
-20
lines changed

docker-compose.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: '3.8'
2+
3+
services:
4+
github-stats:
5+
image: jumongweb/github-stats:latest
6+
environment:
7+
- SPRING_DATASOURCE_URL=${DB_URL}
8+
- SPRING_DATASOURCE_USERNAME=${DB_USERNAME}
9+
- SPRING_DATASOURCE_PASSWORD=${DB_PASSWORD}
10+
depends_on:
11+
db:
12+
condition: service_healthy
13+
ports:
14+
- "2050:2050"
15+
16+
db:
17+
image: postgres:alpine
18+
environment:
19+
- POSTGRES_USER=${POSTGRES_USER}
20+
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
21+
- POSTGRES_DB=${POSTGRES_DB}
22+
healthcheck:
23+
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
24+
interval: 5s
25+
timeout: 5s
26+
retries: 5
27+
volumes:
28+
- db_data:/var/lib/postgresql/data
29+
30+
volumes:
31+
db_data:

pom.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@
3434
<groupId>org.springframework.boot</groupId>
3535
<artifactId>spring-boot-starter-data-jpa</artifactId>
3636
</dependency>
37-
<dependency>
38-
<groupId>org.springframework.boot</groupId>
39-
<artifactId>spring-boot-starter-security</artifactId>
40-
</dependency>
41-
<dependency>
42-
<groupId>org.springframework.boot</groupId>
43-
<artifactId>spring-boot-starter-validation</artifactId>
44-
</dependency>
37+
<!-- <dependency>-->
38+
<!-- <groupId>org.springframework.boot</groupId>-->
39+
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
40+
<!-- </dependency>-->
41+
<!-- <dependency>-->
42+
<!-- <groupId>org.springframework.boot</groupId>-->
43+
<!-- <artifactId>spring-boot-starter-validation</artifactId>-->
44+
<!-- </dependency>-->
4545
<dependency>
4646
<groupId>org.springframework.boot</groupId>
4747
<artifactId>spring-boot-starter-web</artifactId>
@@ -64,11 +64,11 @@
6464
<artifactId>spring-boot-starter-test</artifactId>
6565
<scope>test</scope>
6666
</dependency>
67-
<dependency>
68-
<groupId>org.springframework.security</groupId>
69-
<artifactId>spring-security-test</artifactId>
70-
<scope>test</scope>
71-
</dependency>
67+
<!-- <dependency>-->
68+
<!-- <groupId>org.springframework.security</groupId>-->
69+
<!-- <artifactId>spring-security-test</artifactId>-->
70+
<!-- <scope>test</scope>-->
71+
<!-- </dependency>-->
7272
<!-- <dependency>-->
7373
<!-- <groupId>io.jsonwebtoken</groupId>-->
7474
<!-- <artifactId>jjwt-impl</artifactId>-->

src/main/java/com/jumongweb/GithubStats/data/model/User.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.jumongweb.GithubStats.data.model;
22

33
import jakarta.persistence.*;
4-
import jakarta.validation.constraints.Email;
4+
//import jakarta.validation.constraints.Email;
55
import lombok.Data;
66

77
@Entity

src/main/resources/application.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
spring.datasource.username=${DB_USERNAME}
2-
spring.datasource.password=${DB_PASSWORD}
3-
spring.datasource.url=${DB_URL}
4-
#spring.datasource.username=postgres
5-
#spring.datasource.password=Lt*08161554409
6-
#spring.datasource.url=jdbc:postgresql://localhost:5432/github-stats
1+
#spring.datasource.username=${DB_USERNAME}
2+
#spring.datasource.password=${DB_PASSWORD}
3+
#spring.datasource.url=${DB_URL}
4+
spring.datasource.username=postgres
5+
spring.datasource.password=Lt*08161554409
6+
spring.datasource.url=jdbc:postgresql://localhost:5432/github-stats
77
server.port=2050
88
spring.jpa.hibernate.ddl-auto=update
99
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

0 commit comments

Comments
 (0)