Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -58,6 +58,9 @@ classpath-data.json
|
|||||||
|
|
||||||
# local Spring configs
|
# local Spring configs
|
||||||
application-local.properties
|
application-local.properties
|
||||||
|
application-local.yaml
|
||||||
|
application-local-*.properties
|
||||||
|
application-local-*.yaml
|
||||||
|
|
||||||
# Maven
|
# Maven
|
||||||
maven.properties
|
maven.properties
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import org.springframework.boot.SpringApplication;
|
|||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
||||||
import org.springframework.web.servlet.view.RedirectView;
|
import org.springframework.web.servlet.view.RedirectView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,10 +35,7 @@ public class DDIStart {
|
|||||||
public static class RedirectController {
|
public static class RedirectController {
|
||||||
|
|
||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
public RedirectView redirectToSwagger(
|
public RedirectView redirectToSwagger() {
|
||||||
RedirectAttributes attributes) {
|
|
||||||
attributes.addFlashAttribute("flashAttribute", "redirectWithRedirectView");
|
|
||||||
attributes.addAttribute("attribute", "redirectWithRedirectView");
|
|
||||||
return new RedirectView("swagger-ui/index.html");
|
return new RedirectView("swagger-ui/index.html");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import org.springframework.boot.SpringApplication;
|
|||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
||||||
import org.springframework.web.servlet.view.RedirectView;
|
import org.springframework.web.servlet.view.RedirectView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,10 +35,7 @@ public class MgmtServerStart {
|
|||||||
public static class RedirectController {
|
public static class RedirectController {
|
||||||
|
|
||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
public RedirectView redirectToSwagger(
|
public RedirectView redirectToSwagger() {
|
||||||
RedirectAttributes attributes) {
|
|
||||||
attributes.addFlashAttribute("flashAttribute", "redirectWithRedirectView");
|
|
||||||
attributes.addAttribute("attribute", "redirectWithRedirectView");
|
|
||||||
return new RedirectView("swagger-ui/index.html");
|
return new RedirectView("swagger-ui/index.html");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import org.springframework.boot.SpringApplication;
|
|||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
||||||
import org.springframework.web.servlet.view.RedirectView;
|
import org.springframework.web.servlet.view.RedirectView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,9 +39,7 @@ public class Start {
|
|||||||
public static class RedirectController {
|
public static class RedirectController {
|
||||||
|
|
||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
public RedirectView redirectToSwagger(final RedirectAttributes attributes) {
|
public RedirectView redirectToSwagger() {
|
||||||
attributes.addFlashAttribute("flashAttribute", "redirectWithRedirectView");
|
|
||||||
attributes.addAttribute("attribute", "redirectWithRedirectView");
|
|
||||||
return new RedirectView("swagger-ui/index.html");
|
return new RedirectView("swagger-ui/index.html");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user