File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
samples/basic/spring-boot
src/main/java/com/github/containersolutions/operator/sample Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 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
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 >
Original file line number Diff line number Diff line change 11package com .github .containersolutions .operator .sample ;
22
3+ import com .github .containersolutions .operator .api .Controller ;
34import org .springframework .boot .SpringApplication ;
45import 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
715public class SpringBootStarterSampleApplication {
816
You can’t perform that action at this time.
0 commit comments