diff --git a/manifest.yml b/manifest.yml deleted file mode 100644 index af2459c4095cfd7a2b2c571a72171cd4d833d458..0000000000000000000000000000000000000000 --- a/manifest.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -applications: -- buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git - host: dummy-service - name: dummy-service - memory: 64M \ No newline at end of file diff --git a/src/main/java/de/rtuni/ms/ds/Application.java b/src/main/java/de/rtuni/ms/ds/Application.java index 59f6bcd0fb4c180fc73f87ae3dd1cb3afa1b5437..d0aa494d1ef72a5cc9c46cd818f6cda6fc5cafff 100644 --- a/src/main/java/de/rtuni/ms/ds/Application.java +++ b/src/main/java/de/rtuni/ms/ds/Application.java @@ -10,7 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; /** - * Dummy service for microservice architecture. + * Class for starting dummy service. * * @author Julian * @@ -21,11 +21,11 @@ public class Application { //--------------------------------------------------------------------------------------------- /** - * Starts the application. + * Start the application. * * @param args The arguments */ - public static void main(final String[] args) { SpringApplication.run(Application.class, args); } + public static void main(String[] args) { SpringApplication.run(Application.class, args); } //--------------------------------------------------------------------------------------------- } diff --git a/src/main/java/de/rtuni/ms/ds/HomeController.java b/src/main/java/de/rtuni/ms/ds/controller/HomeController.java similarity index 63% rename from src/main/java/de/rtuni/ms/ds/HomeController.java rename to src/main/java/de/rtuni/ms/ds/controller/HomeController.java index 78e63c1e7f12ff6cafab05be99d4c3cb0d3d25b6..ca7550bda2dec7fab9335e4fb1bb324812189959 100644 --- a/src/main/java/de/rtuni/ms/ds/HomeController.java +++ b/src/main/java/de/rtuni/ms/ds/controller/HomeController.java @@ -1,42 +1,44 @@ -/* - * Copyright 2019 (C) by Julian Horner. - * All Rights Reserved. - */ - -package de.rtuni.ms.ds; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -/** - * Class that handles all kind of requests. - * - * @author Julian - * - */ -@Controller -public class HomeController { - //--------------------------------------------------------------------------------------------- - - /** - * Catches the request for the start page and returns the name of the corresponding template. - * - * @return The name of the template - */ - @RequestMapping("/") - public String index() { - return "index"; - } - - /** - * Catches the request for the secure page and returns the name of the corresponding template. - * - * @return The name of the template - */ - @RequestMapping("/securedPage") - public String securedPage() { - return "securedPage"; - } - - //--------------------------------------------------------------------------------------------- +/* + * Copyright 2019 (C) by Julian Horner. + * All Rights Reserved. + */ + +package de.rtuni.ms.ds.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +/** + * Controller that handles all requests for the dummy service. + * + * @author Julian + * + */ +@Controller +public class HomeController { + //--------------------------------------------------------------------------------------------- + + /** + * Catch the request for the start page and return the name of the corresponding + * template. + * + * @return The name of the template to show + */ + @RequestMapping("/") + public String index() { + return "index"; + } + + /** + * Catch the request for the secure page and return the name of the corresponding + * template. + * + * @return The name of the template to show + */ + @RequestMapping("/securedPage") + public String securedPage() { + return "securedPage"; + } + + //--------------------------------------------------------------------------------------------- } \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1b7b187896dc697bcea80a7514805d2a87c70fc4..a287557288c473b783e7e62d8f5d15e729341339 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,15 +1,10 @@ -# Spring properties spring: application: - name: dummy-service # Identify this application + name: dummy-service # Identifier of this application -# Map the error path to error template (for Thymeleaf) -error.path: /error - -# HTTP Server -server.port: 3333 # HTTP (Tomcat) port +server.port: 3333 eureka: client: serviceUrl: - defaultZone: http://localhost:8761/eureka/ \ No newline at end of file + defaultZone: http://localhost:8761/eureka/ # URL of the eureka server for registration \ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 9b26a7209a63004c6808999ec264ba045970c2ba..32b692822383250407e0f01c0bdf0533af72df5c 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -6,6 +6,6 @@ </head> <body> <h1>Page without authentication</h1> - <a href="#" th:href="@{/securedPage}">geschützte Seite anfordern</a> + <a href="#" th:href="@{/securedPage}">Request a secured page</a> </body> </html> \ No newline at end of file