BAEL-1776: Add description and change module name (#4607)
* Add description and change module name * Fix mvn parent in spring-boot-custom-starter
This commit is contained in:
parent
59277b4339
commit
bebaf6d339
|
@ -1,2 +1,10 @@
|
|||
### Relevant Articles:
|
||||
- [Creating a Custom Starter with Spring Boot](http://www.baeldung.com/spring-boot-custom-starter)
|
||||
|
||||
- **greeter-library**: The sample library that we're creating the starter for.
|
||||
|
||||
- **greeter-spring-boot-autoconfigure**: The project containing the auto-configuration for the library.
|
||||
|
||||
- **greeter-spring-boot-starter**: The custom starter for the library.
|
||||
|
||||
- **greeter-spring-boot-sample-app**: The sample project that uses the custom starter.
|
|
@ -3,12 +3,12 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>greeter</artifactId>
|
||||
<artifactId>greeter-library</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>spring-boot-custom-starter</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent-boot-1</relativePath>
|
||||
<relativePath>../../spring-boot-custom-starter</relativePath>
|
||||
</parent>
|
||||
</project>
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.greeter;
|
||||
package com.baeldung.greeter.library;
|
||||
|
||||
import static com.baeldung.greeter.GreeterConfigParams.*;
|
||||
import static com.baeldung.greeter.library.GreeterConfigParams.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.greeter;
|
||||
package com.baeldung.greeter.library;
|
||||
|
||||
public class GreeterConfigParams {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.greeter;
|
||||
package com.baeldung.greeter.library;
|
||||
|
||||
import java.util.Properties;
|
||||
|
|
@ -1,10 +1,12 @@
|
|||
package com.baeldung.greeter;
|
||||
|
||||
import static com.baeldung.greeter.GreeterConfigParams.*;
|
||||
import static com.baeldung.greeter.library.GreeterConfigParams.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.baeldung.greeter.library.Greeter;
|
||||
import com.baeldung.greeter.library.GreetingConfig;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
|
@ -5,12 +5,14 @@
|
|||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>greeter-spring-boot-autoconfigure</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>spring-boot-custom-starter</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent-boot-1</relativePath>
|
||||
<relativePath>../../spring-boot-custom-starter</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring-boot.version>1.5.2.RELEASE</spring-boot.version>
|
||||
|
@ -40,7 +42,7 @@
|
|||
|
||||
<dependency>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>greeter</artifactId>
|
||||
<artifactId>greeter-library</artifactId>
|
||||
<version>${greeter.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.greeter.autoconfigure;
|
||||
|
||||
import static com.baeldung.greeter.GreeterConfigParams.*;
|
||||
import static com.baeldung.greeter.library.GreeterConfigParams.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
|
@ -9,8 +9,8 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
|||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.baeldung.greeter.Greeter;
|
||||
import com.baeldung.greeter.GreetingConfig;
|
||||
import com.baeldung.greeter.library.Greeter;
|
||||
import com.baeldung.greeter.library.GreetingConfig;
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnClass(Greeter.class)
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.springframework.boot.CommandLineRunner;
|
|||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
import com.baeldung.greeter.Greeter;
|
||||
import com.baeldung.greeter.library.Greeter;
|
||||
|
||||
@SpringBootApplication
|
||||
public class GreeterSampleApplication implements CommandLineRunner {
|
||||
|
|
|
@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import com.baeldung.greeter.Greeter;
|
||||
import com.baeldung.greeter.library.Greeter;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringBootTest(classes = GreeterSampleApplication.class)
|
||||
|
|
|
@ -5,12 +5,14 @@
|
|||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>greeter-spring-boot-starter</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>spring-boot-custom-starter</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent-boot-1</relativePath>
|
||||
<relativePath>../../spring-boot-custom-starter</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<greeter.version>0.0.1-SNAPSHOT</greeter.version>
|
||||
|
@ -33,7 +35,7 @@
|
|||
|
||||
<dependency>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>greeter</artifactId>
|
||||
<artifactId>greeter-library</artifactId>
|
||||
<version>${greeter.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</parent>
|
||||
|
||||
<modules>
|
||||
<module>greeter</module>
|
||||
<module>greeter-library</module>
|
||||
<module>greeter-spring-boot-autoconfigure</module>
|
||||
<module>greeter-spring-boot-starter</module>
|
||||
<module>greeter-spring-boot-sample-app</module>
|
||||
|
|
Loading…
Reference in New Issue