Spring Boot Properties Migrator Demo (#11975)

* Spring Boot Properties Migrator Demo

* updated demo properties (#1)

Co-authored-by: s9m33r <no-reply>

* Article/bael 5446 (#2)

* updated demo properties

* formatting

Co-authored-by: s9m33r <no-reply>

Co-authored-by: s9m33r <no-reply>
This commit is contained in:
Sameer 2022-04-15 19:46:47 +05:30 committed by GitHub
parent 97cda31092
commit 4f6634745d
5 changed files with 92 additions and 0 deletions

View File

@ -64,6 +64,7 @@
<module>spring-boot-properties</module>
<module>spring-boot-properties-2</module>
<module>spring-boot-properties-3</module>
<module>spring-boot-properties-migrator-demo</module>
<module>spring-boot-property-exp</module>
<module>spring-boot-runtime</module>
<module>spring-boot-runtime-2</module>

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-boot-properties-migrator-demo</artifactId>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>com.baeldung.spring-boot-modules</groupId>
<artifactId>spring-boot-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<!-- Used to demonstrate a particular scenario in the article -->
<!-- <parent>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-parent</artifactId>-->
<!-- <version>2.0.0.RELEASE</version> &lt;!&ndash; spring boot version number &ndash;&gt;-->
<!-- <relativePath/> &lt;!&ndash; lookup parent from repository &ndash;&gt;-->
<!-- </parent>-->
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,11 @@
package com.baeldung.spring.boot.properties.migrator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Main {
public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
}

View File

@ -0,0 +1,16 @@
# Deprecated Properties for Demonstration
#spring:
# resources:
# cache:
# period: 31536000
# chain:
# compressed: true
# html-application-cache: true
spring:
web:
resources:
cache:
period: 31536000
chain:
compressed: false

View File

@ -0,0 +1,7 @@
# Deprecated Properties for Demonstration
#spring.resources.cache.period=31536000
#spring.resources.chain.compressed=false
#spring.resources.chain.html-application-cache=false
spring.web.resources.cache.period=31536000
spring.web.resources.chain.compressed=false
banner.image.location="myBanner.txt"