Commit 6c953382 authored by Michael's avatar Michael

renamed data class

parent 2a5400c4
# Spring Demo Application
This is an rather minimalistic Java Spring Boot Demo application illustrating external configuration using different methods in a Docker deployment (see [Showcased](#showcased) for more information).
This is an rather minimalistic Java Spring Boot Demo application illustrating
1. Systemenvironment variables from .env file
1. Systemenvironment variables from docker-compose file
1. Config variables from .yaml file
1. Config variable from .properties file including nesting and arrays
1. Environment-based spring profile configuration
1. Simple REST service
1. Docker deployment
## Requirements
......@@ -25,14 +33,6 @@ Clone or download thist repository and change into this folder.
- localhost:8080
- Actuator security is disabled: curl http://localhost:8080/env
## Showcased
1. Systemenvironment variables from .env file
1. Systemenvironment variables from docker-compose file
1. Config variables from .yaml file
1. Config variable from .properties file including nesting and arrays
1. Environment-based spring profile configuration
## Official Documentation
- [spring.io getting started](https://spring.io/guides/gs/spring-boot/)
......
......@@ -32,8 +32,8 @@ public class Application {
}
@RequestMapping("/content")
public Content greeting(@RequestParam(value="name", defaultValue="World") String name) {
return new Content(counter.incrementAndGet(), String.format(template, name));
public Post greeting(@RequestParam(value="name", defaultValue="World") String name) {
return new Post(counter.incrementAndGet(), String.format(template, name));
}
public static void main(String[] args) {
......
......@@ -5,12 +5,12 @@ import lombok.ToString;
@Data
@ToString(includeFieldNames = false)
public class Content {
public class Post {
private final long id;
private final String content;
public Content(long id, String content) {
public Post(long id, String content) {
this.id = id;
this.content = content;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment