-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMybatisApplication.java
49 lines (40 loc) · 1.22 KB
/
MybatisApplication.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.example;
import com.example.annotation.AnnotationMain;
import com.example.base.BaseMain;
import com.example.plugin.Plugin;
import com.example.plugin.PluginMain;
import com.example.result.ResultMain;
import org.apache.ibatis.plugin.Interceptor;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.Bean;
@SpringBootApplication
public class MybatisApplication {
public static void main(String[] args) {
new SpringApplicationBuilder(MybatisApplication.class)
.web(WebApplicationType.NONE)
.run(args);
}
@Bean
public CommandLineRunner base() {
return new BaseMain();
}
@Bean
public CommandLineRunner annotation() {
return new AnnotationMain();
}
@Bean
public CommandLineRunner result() {
return new ResultMain();
}
@Bean
public Interceptor interceptor() {
return new Plugin();
}
@Bean
public CommandLineRunner plugin() {
return new PluginMain();
}
}