Skip to content

Commit 4fb9261

Browse files
committed
Revert "removed spring boot support, added spring boot sample"
This reverts commit cff8b86. # Conflicts: # README.md # pom.xml
1 parent bb3eea0 commit 4fb9261

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

samples/basic/spring-boot/pom.xml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,11 @@
2525
<groupId>com.github.containersolutions</groupId>
2626
<artifactId>operator-framework-samples-common</artifactId>
2727
<version>${project.version}</version>
28-
<exclusions>
29-
<exclusion>
30-
<groupId>org.apache.logging.log4j</groupId>
31-
<artifactId>log4j-slf4j-impl</artifactId>
32-
</exclusion>
33-
</exclusions>
3428
</dependency>
3529
<dependency>
36-
<groupId>org.springframework.boot</groupId>
37-
<artifactId>spring-boot-starter</artifactId>
30+
<groupId>com.github.containersolutions</groupId>
31+
<artifactId>spring-boot-operator-framework-starter</artifactId>
32+
<version>${project.version}</version>
3833
</dependency>
3934
</dependencies>
4035

@@ -43,7 +38,7 @@
4338
<dependency>
4439
<groupId>org.springframework.boot</groupId>
4540
<artifactId>spring-boot-dependencies</artifactId>
46-
<version>2.2.6.RELEASE</version>
41+
<version>2.1.6.RELEASE</version>
4742
<type>pom</type>
4843
<scope>import</scope>
4944
</dependency>

samples/basic/spring-boot/src/main/java/com/github/containersolutions/operator/sample/SpringBootStarterSampleApplication.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
package com.github.containersolutions.operator.sample;
22

3+
import com.github.containersolutions.operator.api.Controller;
34
import org.springframework.boot.SpringApplication;
45
import org.springframework.boot.autoconfigure.SpringBootApplication;
6+
import org.springframework.context.annotation.ComponentScan;
7+
import org.springframework.context.annotation.FilterType;
58

9+
/**
10+
* Note that we have multiple options here either we can add this component scan as seen below. Or annotate controllers
11+
* with @Component or @Service annotation or just register the bean within a spring "@Configuration".
12+
*/
13+
@ComponentScan(includeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION, value = Controller.class)})
614
@SpringBootApplication
715
public class SpringBootStarterSampleApplication {
816

0 commit comments

Comments
 (0)