-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
5 changed files
with
17 additions
and
24 deletions.
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
Binary file modified
BIN
-454 Bytes
(80%)
backend/ready/build/classes/java/main/project/one/OneApplication.class
Binary file not shown.
Binary file modified
BIN
+15 Bytes
(100%)
...d/ready/build/tmp/compileJava/compileTransaction/stash-dir/OneApplication.class.uniqueId0
Binary file not shown.
Binary file modified
BIN
-184 Bytes
(100%)
backend/ready/build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
28 changes: 10 additions & 18 deletions
28
backend/ready/src/main/java/project/one/OneApplication.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 |
---|---|---|
@@ -1,34 +1,26 @@ | ||
package project.one; | ||
|
||
import io.github.cdimascio.dotenv.Dotenv; | ||
import io.swagger.v3.oas.annotations.OpenAPIDefinition; | ||
import io.swagger.v3.oas.annotations.servers.Server; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; | ||
|
||
import java.util.TimeZone; | ||
|
||
@OpenAPIDefinition(servers = {@Server(url = "/", description = "Default Server URL")}) | ||
@SpringBootApplication(exclude = SecurityAutoConfiguration.class) | ||
public class OneApplication { | ||
|
||
public static void main(String[] args) { | ||
Dotenv dotenv = Dotenv.configure() | ||
.directory("/app/") | ||
.filename("backend.env") | ||
.load(); | ||
System.setProperty("spring.datasource.url", dotenv.get("SPRING_DATASOURCE_URL")); | ||
System.setProperty("spring.datasource.password", dotenv.get("SPRING_DATASOURCE_PASSWORD")); | ||
System.setProperty("spring.datasource.username", dotenv.get("SPRING_DATASOURCE_USERNAME")); | ||
System.setProperty("spring.datasource.driver.class.name", dotenv.get("SPRING_DATASOURCE_DRIVER_CLASS_NAME")); | ||
System.setProperty("spring.jpa.database", dotenv.get("SPRING_JPA_DATABASE")); | ||
System.setProperty("s3.access.key", dotenv.get("S3_ACCESS_KEY")); | ||
System.setProperty("s3.secret.key", dotenv.get("S3_SECRET_KEY")); | ||
System.setProperty("s3.bucket.url", dotenv.get("S3_BUCKET_URL")); | ||
System.setProperty("s3.bucket.name", dotenv.get("S3_BUCKET_NAME")); | ||
System.setProperty("spring.datasource.url", System.getenv("SPRING_DATASOURCE_URL")); | ||
System.setProperty("spring.datasource.password", System.getenv("SPRING_DATASOURCE_PASSWORD")); | ||
System.setProperty("spring.datasource.username", System.getenv("SPRING_DATASOURCE_USERNAME")); | ||
System.setProperty("spring.datasource.driver.class.name", System.getenv("SPRING_DATASOURCE_DRIVER_CLASS_NAME")); | ||
System.setProperty("spring.jpa.database", System.getenv("SPRING_JPA_DATABASE")); | ||
System.setProperty("s3.access.key", System.getenv("S3_ACCESS_KEY")); | ||
System.setProperty("s3.secret.key", System.getenv("S3_SECRET_KEY")); | ||
System.setProperty("s3.bucket.url", System.getenv("S3_BUCKET_URL")); | ||
System.setProperty("s3.bucket.name", System.getenv("S3_BUCKET_NAME")); | ||
|
||
SpringApplication.run(OneApplication.class, args); | ||
} | ||
|
||
} | ||
} |