File tree Expand file tree Collapse file tree 7 files changed +126
-0
lines changed
lambda-query-mongo-starter
java/com/github/xuejike/query/mongo/starter
lambda-query-mybatis-plus-starter
java/com/github/xuejike/query/mybatisplus/starter Expand file tree Collapse file tree 7 files changed +126
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5+ <parent >
6+ <artifactId >lambda-query</artifactId >
7+ <groupId >com.github.xuejike</groupId >
8+ <version >1.0.1-SNAPSHOT</version >
9+ </parent >
10+ <modelVersion >4.0.0</modelVersion >
11+
12+ <artifactId >lambda-query-mongo-starter</artifactId >
13+
14+ <properties >
15+ <maven .compiler.source>8</maven .compiler.source>
16+ <maven .compiler.target>8</maven .compiler.target>
17+ </properties >
18+
19+ <dependencies >
20+ <dependency >
21+ <groupId >org.springframework.boot</groupId >
22+ <artifactId >spring-boot-configuration-processor</artifactId >
23+ <optional >true</optional >
24+ <scope >compile</scope >
25+ <version >2.2.11.RELEASE</version >
26+ </dependency >
27+
28+ <dependency >
29+ <groupId >org.springframework.boot</groupId >
30+ <artifactId >spring-boot-starter</artifactId >
31+ <version >2.2.11.RELEASE</version >
32+ <scope >compile</scope >
33+ </dependency >
34+ <dependency >
35+ <groupId >com.github.xuejike</groupId >
36+ <artifactId >lambda-query-mongo</artifactId >
37+ <version >${query.version} </version >
38+ <scope >compile</scope >
39+ </dependency >
40+ </dependencies >
41+ </project >
Original file line number Diff line number Diff line change 1+ package com .github .xuejike .query .mongo .starter ;
2+
3+ import com .github .xuejike .query .mongo .MongoDaoFactory ;
4+ import org .springframework .beans .factory .annotation .Autowired ;
5+ import org .springframework .context .annotation .Bean ;
6+ import org .springframework .context .annotation .Configuration ;
7+ import org .springframework .data .mongodb .core .MongoTemplate ;
8+
9+ /**
10+ * @author xuejike
11+ * @date 2020/12/31
12+ */
13+ @ Configuration
14+ public class MongoQueryAutoConfig {
15+ @ Bean
16+ public MongoDaoFactory mongoDaoFactory (MongoTemplate mongoTemplate ){
17+ return new MongoDaoFactory (mongoTemplate );
18+ }
19+ }
Original file line number Diff line number Diff line change 1+ org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.github.xuejike.query.mongo.starter.MongoQueryAutoConfig
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5+ <parent >
6+ <artifactId >lambda-query</artifactId >
7+ <groupId >com.github.xuejike</groupId >
8+ <version >1.0.1-SNAPSHOT</version >
9+ </parent >
10+ <modelVersion >4.0.0</modelVersion >
11+
12+ <artifactId >lambda-query-mybatis-plus-starter</artifactId >
13+
14+ <properties >
15+ <maven .compiler.source>8</maven .compiler.source>
16+ <maven .compiler.target>8</maven .compiler.target>
17+ </properties >
18+
19+ <dependencies >
20+ <dependency >
21+ <groupId >org.springframework.boot</groupId >
22+ <artifactId >spring-boot-configuration-processor</artifactId >
23+ <optional >true</optional >
24+ <scope >compile</scope >
25+ <version >2.2.11.RELEASE</version >
26+ </dependency >
27+
28+ <dependency >
29+ <groupId >org.springframework.boot</groupId >
30+ <artifactId >spring-boot-starter</artifactId >
31+ <version >2.2.11.RELEASE</version >
32+ <scope >compile</scope >
33+ </dependency >
34+ <dependency >
35+ <groupId >com.github.xuejike</groupId >
36+ <artifactId >lambda-query-mybatis-plus</artifactId >
37+ <version >${query.version} </version >
38+ <scope >compile</scope >
39+ </dependency >
40+ </dependencies >
41+ </project >
Original file line number Diff line number Diff line change 1+ package com .github .xuejike .query .mybatisplus .starter ;
2+
3+ import com .baomidou .mybatisplus .core .mapper .BaseMapper ;
4+ import com .github .xuejike .query .mybatisplus .MyBatisPlusDaoFactory ;
5+ import org .springframework .context .annotation .Bean ;
6+ import org .springframework .context .annotation .Configuration ;
7+
8+ import java .util .Collection ;
9+
10+ /**
11+ * @author xuejike
12+ * @date 2020/12/31
13+ */
14+ @ Configuration
15+ public class MybatisPlusAutoConfig {
16+ @ Bean
17+ public MyBatisPlusDaoFactory myBatisPlusDaoFactory (Collection <BaseMapper > mapperCollection ){
18+ MyBatisPlusDaoFactory myBatisPlusDaoFactory = new MyBatisPlusDaoFactory (mapperCollection );
19+ return myBatisPlusDaoFactory ;
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.github.xuejike.query.mybatisplus.starter.MybatisPlusAutoConfig
Original file line number Diff line number Diff line change 1515 <module >lambda-query-mybatis-plus</module >
1616
1717 <module >mongo-demo</module >
18+ <module >lambda-query-mongo-starter</module >
19+ <module >lambda-query-mybatis-plus-starter</module >
1820 </modules >
1921 <properties >
2022 <maven .compiler.source>1.8</maven .compiler.source>
You can’t perform that action at this time.
0 commit comments