Skip to content
Snippets Groups Projects
Commit f5cd3bde authored by Julian Horner's avatar Julian Horner
Browse files
Conflicts:
	pom.xml
	src/main/java/de/rtuni/ms/ds/Application.java
	src/main/resources/application.yml
parents aa730722 da02a17d
No related branches found
No related tags found
No related merge requests found
launchConfigurations/
.git/
\ No newline at end of file
{
"ServiceId": "com.ibm.cloudoe.orion.client.deploy",
"Params": {
"Target": {
"Url": "https://api.eu-gb.cf.cloud.ibm.com",
"Org": "organisation one",
"Space": "dev"
},
"Name": "dummy-service",
"Instrumentation": {
"domain": "eu-gb.mybluemix.net",
"instances": "1"
}
},
"Path": "manifest.yml",
"Type": "Cloud Foundry"
}
\ No newline at end of file
---
applications:
- buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git
host: dummy-service
name: dummy-service
memory: 64M
\ No newline at end of file
/*
* Copyright 2019 (C) by Julian Horner.
* All Rights Reserved.
*/
package de.rtuni.ms.ds;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
/**
* Dummy service.
*
* @author Julian
*
*/
@SpringBootApplication
@EnableEurekaClient
public class Application {
//---------------------------------------------------------------------------------------------
/**
* Starts the application.
*
* @param args The arguments
*/
public static void main(final String[] args) { SpringApplication.run(Application.class, args); }
//---------------------------------------------------------------------------------------------
}
/*
* 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("/securePage")
public String securePage() {
return "securePage";
}
//---------------------------------------------------------------------------------------------
}
\ No newline at end of file
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Dummy page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Page without authentication</h1>
<a href="#" th:href="@{/securePage}">geschützte Seite anfordern</a>
</body>
</html>
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Very secure page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Page with authentication</h1>
<a href="#" th:href="@{/}">You're authorised to see this page</a>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment