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 25
25
<groupId >com.github.containersolutions</groupId >
26
26
<artifactId >operator-framework-samples-common</artifactId >
27
27
<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 >
34
28
</dependency >
35
29
<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 >
38
33
</dependency >
39
34
</dependencies >
40
35
43
38
<dependency >
44
39
<groupId >org.springframework.boot</groupId >
45
40
<artifactId >spring-boot-dependencies</artifactId >
46
- <version >2.2 .6.RELEASE</version >
41
+ <version >2.1 .6.RELEASE</version >
47
42
<type >pom</type >
48
43
<scope >import</scope >
49
44
</dependency >
Original file line number Diff line number Diff line change 1
1
package com .github .containersolutions .operator .sample ;
2
2
3
+ import com .github .containersolutions .operator .api .Controller ;
3
4
import org .springframework .boot .SpringApplication ;
4
5
import org .springframework .boot .autoconfigure .SpringBootApplication ;
6
+ import org .springframework .context .annotation .ComponentScan ;
7
+ import org .springframework .context .annotation .FilterType ;
5
8
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 )})
6
14
@ SpringBootApplication
7
15
public class SpringBootStarterSampleApplication {
8
16
You can’t perform that action at this time.
0 commit comments