Skip to content

Commit

Permalink
fix: docker-compose.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
sunwupark committed Jan 31, 2024
1 parent 1092ed4 commit d1130a0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew

- name: Set .yml for main
run: |
# Create resources directory if it doesn't exist
Expand All @@ -31,6 +28,9 @@ jobs:
echo "${{ secrets.MAIN_DATABASE_YML }}" >> ./application.yml
shell: bash

- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew clean build --exclude-task test

Expand Down
19 changes: 18 additions & 1 deletion src/main/java/umc/meme/shop/ShopApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,29 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;

import java.io.IOException;


@SpringBootApplication
@EnableJpaAuditing
public class ShopApplication {

public static void main(String[] args) {
public static void main(String[] args) throws IOException {
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();

// Resolve the resource for the current file
Resource resource = resolver.getResource("classpath:");

// Get the absolute path of the current file
String absolutePath = resource.getFile().getAbsolutePath();

// Print the absolute path
System.out.println("Absolute path to the current file: " + absolutePath);

SpringApplication.run(ShopApplication.class, args);
}

Expand Down

0 comments on commit d1130a0

Please sign in to comment.