Skip to content

Commit

Permalink
feat :: Add RedirectController
Browse files Browse the repository at this point in the history
  • Loading branch information
HyunSu1768 committed Dec 3, 2023
1 parent da76ef0 commit 5bcc4b5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .xquare/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ config:
name: entry-config-server
prefix: "/equus-config"
service_type: be
port: 80
port: 8888
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ FROM openjdk:17
COPY build/libs/Equus-Config-Server-0.0.1-SNAPSHOT.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]

FROM nginx
COPY nginx.conf /etc/nginx/conf.d/nginx.conf

ARG CONFIG_URI
ENV CONFIG_URI ${CONFIG_URI}

Expand All @@ -13,4 +10,3 @@ ENV CONFIG_USERNAME ${CONFIG_USERNAME}

ARG CONFIG_PASSWORD
ENV CONFIG_PASSWORD ${CONFIG_PASSWORD}

8 changes: 0 additions & 8 deletions nginx.conf

This file was deleted.

14 changes: 14 additions & 0 deletions src/main/kotlin/hs/kr/equus/configserver/RedirectController.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package hs.kr.equus.configserver

import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable


@Controller
class RedirectController {
@GetMapping("/equus-config/{name}/{profile}")
fun redirect(@PathVariable name: String, @PathVariable profile: String): String {
return "redirect:/$name/$profile"
}
}

0 comments on commit 5bcc4b5

Please sign in to comment.