Skip to content

Commit

Permalink
add controller
Browse files Browse the repository at this point in the history
  • Loading branch information
KWY0218 committed Jun 24, 2023
1 parent 2c2f896 commit d1e89d7
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.asap.asapserverlab.controller;

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

@RestController
@RequiredArgsConstructor
public class ServerController {
private final Environment env;

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

0 comments on commit d1e89d7

Please sign in to comment.