File tree Expand file tree Collapse file tree
spring-boot-custom-starter
main/java/com/baeldung/greeter/library
test/java/com/baeldung/greeter
greeter-spring-boot-autoconfigure
src/main/java/com/baeldung/greeter/autoconfigure
greeter-spring-boot-sample-app/src
main/java/com/baeldung/greeter/sample
test/java/com/baeldung/greeter/sample
greeter-spring-boot-starter Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11### Relevant Articles:
22- [ Creating a Custom Starter with Spring Boot] ( http://www.baeldung.com/spring-boot-custom-starter )
3+
4+ - ** greeter-library** : The sample library that we're creating the starter for.
5+
6+ - ** greeter-spring-boot-autoconfigure** : The project containing the auto-configuration for the library.
7+
8+ - ** greeter-spring-boot-starter** : The custom starter for the library.
9+
10+ - ** greeter-spring-boot-sample-app** : The sample project that uses the custom starter.
File renamed without changes.
Original file line number Diff line number Diff line change 33 <modelVersion >4.0.0</modelVersion >
44
55 <groupId >com.baeldung</groupId >
6- <artifactId >greeter</artifactId >
6+ <artifactId >greeter-library </artifactId >
77 <version >0.0.1-SNAPSHOT</version >
88 <parent >
9- <artifactId >parent -boot-1 </artifactId >
9+ <artifactId >spring -boot-custom-starter </artifactId >
1010 <groupId >com.baeldung</groupId >
1111 <version >0.0.1-SNAPSHOT</version >
12- <relativePath >../../parent -boot-1 </relativePath >
12+ <relativePath >../../spring -boot-custom-starter </relativePath >
1313 </parent >
1414</project >
Original file line number Diff line number Diff line change 1- package com .baeldung .greeter ;
1+ package com .baeldung .greeter . library ;
22
3- import static com .baeldung .greeter .GreeterConfigParams .*;
3+ import static com .baeldung .greeter .library . GreeterConfigParams .*;
44
55import java .time .LocalDateTime ;
66
Original file line number Diff line number Diff line change 1- package com .baeldung .greeter ;
1+ package com .baeldung .greeter . library ;
22
33public class GreeterConfigParams {
44
Original file line number Diff line number Diff line change 1- package com .baeldung .greeter ;
1+ package com .baeldung .greeter . library ;
22
33import java .util .Properties ;
44
Original file line number Diff line number Diff line change 11package com .baeldung .greeter ;
22
3- import static com .baeldung .greeter .GreeterConfigParams .*;
3+ import static com .baeldung .greeter .library . GreeterConfigParams .*;
44import static org .junit .Assert .assertEquals ;
55
66import java .time .LocalDateTime ;
77
8+ import com .baeldung .greeter .library .Greeter ;
9+ import com .baeldung .greeter .library .GreetingConfig ;
810import org .junit .BeforeClass ;
911import org .junit .Test ;
1012
Original file line number Diff line number Diff line change 55 <groupId >com.baeldung</groupId >
66 <artifactId >greeter-spring-boot-autoconfigure</artifactId >
77 <version >0.0.1-SNAPSHOT</version >
8+
89 <parent >
9- <artifactId >parent -boot-1 </artifactId >
10+ <artifactId >spring -boot-custom-starter </artifactId >
1011 <groupId >com.baeldung</groupId >
1112 <version >0.0.1-SNAPSHOT</version >
12- <relativePath >../../parent -boot-1 </relativePath >
13+ <relativePath >../../spring -boot-custom-starter </relativePath >
1314 </parent >
15+
1416 <properties >
1517 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
1618 <spring-boot .version>1.5.2.RELEASE</spring-boot .version>
4042
4143 <dependency >
4244 <groupId >com.baeldung</groupId >
43- <artifactId >greeter</artifactId >
45+ <artifactId >greeter-library </artifactId >
4446 <version >${greeter.version} </version >
4547 <optional >true</optional >
4648 </dependency >
Original file line number Diff line number Diff line change 11package com .baeldung .greeter .autoconfigure ;
22
3- import static com .baeldung .greeter .GreeterConfigParams .*;
3+ import static com .baeldung .greeter .library . GreeterConfigParams .*;
44
55import org .springframework .beans .factory .annotation .Autowired ;
66import org .springframework .boot .autoconfigure .condition .ConditionalOnClass ;
99import org .springframework .context .annotation .Bean ;
1010import org .springframework .context .annotation .Configuration ;
1111
12- import com .baeldung .greeter .Greeter ;
13- import com .baeldung .greeter .GreetingConfig ;
12+ import com .baeldung .greeter .library . Greeter ;
13+ import com .baeldung .greeter .library . GreetingConfig ;
1414
1515@ Configuration
1616@ ConditionalOnClass (Greeter .class )
Original file line number Diff line number Diff line change 55import org .springframework .boot .SpringApplication ;
66import org .springframework .boot .autoconfigure .SpringBootApplication ;
77
8- import com .baeldung .greeter .Greeter ;
8+ import com .baeldung .greeter .library . Greeter ;
99
1010@ SpringBootApplication
1111public class GreeterSampleApplication implements CommandLineRunner {
You can’t perform that action at this time.
0 commit comments