- Timestamp:
- 04/21/26 18:07:57 (3 months ago)
- Branches:
- master
- Children:
- 89156c1
- Parents:
- c4c43f3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
backend/src/main/java/com/trekr/backend/BackendApplication.java
rc4c43f3 r37307aa 4 4 import org.springframework.boot.SpringApplication; 5 5 import org.springframework.boot.autoconfigure.SpringBootApplication; 6 7 import java.nio.file.Files; 8 import java.nio.file.Path; 9 import java.nio.file.Paths; 6 10 7 11 @SpringBootApplication … … 60 64 for (String[] candidate : candidates) { 61 65 try { 66 Path envPath = Paths.get(candidate[0], candidate[1]).normalize(); 67 if (!Files.isRegularFile(envPath)) { 68 continue; 69 } 70 62 71 Dotenv loaded = Dotenv.configure() 63 .directory( candidate[0])64 .filename( candidate[1])72 .directory(envPath.getParent().toString()) 73 .filename(envPath.getFileName().toString()) 65 74 .ignoreIfMissing() 66 75 .load(); 67 if (loaded != null && !loaded.entries().isEmpty()) {76 if (loaded != null) { 68 77 dotenv = loaded; 69 78 break;
Note:
See TracChangeset
for help on using the changeset viewer.
