Implemented an interceptor, that forbiddes access according to a header
[demos/spring-boot] / src / main / java / de / juplo / demo / DemoApplication.java
1 package de.juplo.demo;
2
3 import org.springframework.beans.factory.annotation.Value;
4 import org.springframework.boot.SpringApplication;
5 import org.springframework.boot.autoconfigure.SpringBootApplication;
6 import org.springframework.context.annotation.Bean;
7
8
9 @SpringBootApplication
10 public class DemoApplication
11 {
12         @Value("${application.name}")
13         String applicationName;
14         @Value("${build.version}")
15         String projectVersion;
16
17
18         @Bean
19         public String from(
20                         @Value("${application.name}") String applicationName,
21                         @Value("${build.version}") String projectVersion)
22         {
23                 return applicationName + "@" + projectVersion;
24         }
25
26
27         public static void main(String[] args)
28         {
29                 SpringApplication.run(DemoApplication.class, args);
30         }
31 }