Skip to content

Commit

Permalink
4차 세미나 보강 #10
Browse files Browse the repository at this point in the history
  • Loading branch information
PgmJun committed May 12, 2023
1 parent 461bdff commit 36b4552
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package sopt.org.fourthSeminar.controller;


import lombok.Getter;
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 ServerProfileController {

private final Environment env;

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

0 comments on commit 36b4552

Please sign in to comment.