Skip to content

Commit

Permalink
Merge pull request #48 from Team-UniVoice/46-deploy-debug
Browse files Browse the repository at this point in the history
test : 프로파일 url 추가
  • Loading branch information
softmoca authored Jul 15, 2024
2 parents 27dc3c7 + fa54648 commit 0f738ef
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/java/sopt/univoice/domain/ProfileController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package sopt.univoice.domain;

import lombok.RequiredArgsConstructor;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

@RestController
@RequiredArgsConstructor
public class ProfileController {

private final Environment env;
private static final String NULL = "";

@GetMapping("/profile")
public String getProfile() {
return Arrays.stream(env.getActiveProfiles())
.findFirst()
.orElse(NULL);
}
}

0 comments on commit 0f738ef

Please sign in to comment.