We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6624474 commit db8a1d0Copy full SHA for db8a1d0
src/main/java/com/back/global/controller/HomeController.java
@@ -1,13 +1,25 @@
1
package com.back.global.controller;
2
3
+import org.springframework.beans.factory.annotation.Value;
4
+import org.springframework.context.annotation.Profile;
5
import org.springframework.stereotype.Controller;
6
import org.springframework.web.bind.annotation.GetMapping;
7
8
@Controller
9
public class HomeController {
10
11
+ @Value("${custom.site.frontUrl}")
12
+ private String frontUrl;
13
+
14
@GetMapping("/")
15
+ @Profile("dev")
16
public String redirectToSwagger() {
17
return "redirect:/swagger-ui/index.html";
18
}
19
20
+ @GetMapping("/")
21
+ @Profile("prod")
22
+ public String redirectToFrontend() {
23
+ return "redirect:" + frontUrl;
24
+ }
25
0 commit comments