Skip to content

Commit 5077e19

Browse files
committed
Merge branch 'master' of https://github.com/hengboy/api-boot into 2.0.8.RC1
2 parents ad9a1d6 + bf91158 commit 5077e19

File tree

89 files changed

+5138
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+5138
-0
lines changed
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright [2019] [恒宇少年 - 于起宇]
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
~
17+
-->
18+
19+
<project xmlns="http://maven.apache.org/POM/4.0.0"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22+
<parent>
23+
<artifactId>api-boot-samples</artifactId>
24+
<groupId>org.minbox.framework</groupId>
25+
<version>2.0.7.RELEASE</version>
26+
</parent>
27+
<modelVersion>4.0.0</modelVersion>
28+
<properties>
29+
<java.version>1.8</java.version>
30+
<api.boot.version>2.0.7.RELEASE</api.boot.version>
31+
</properties>
32+
<artifactId>api-boot-sample-integration</artifactId>
33+
<description>
34+
ApiBoot依赖的整合示例项目
35+
该项目是《恒宇少年的知识库》小程序的接口源码
36+
可以参考来整合使用ApiBoot相关的依赖
37+
</description>
38+
<licenses>
39+
<license>
40+
<name>Apache License, Version 2.0</name>
41+
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
42+
</license>
43+
</licenses>
44+
<developers>
45+
<developer>
46+
<name>于起宇</name>
47+
<email>jnyuqy@gmail.com</email>
48+
<organizationUrl>http://blog.yuqiyu.com</organizationUrl>
49+
</developer>
50+
</developers>
51+
<dependencies>
52+
<dependency>
53+
<groupId>org.springframework.boot</groupId>
54+
<artifactId>spring-boot-starter-web</artifactId>
55+
</dependency>
56+
<!--ApiBoot Security Oauth-->
57+
<dependency>
58+
<groupId>org.minbox.framework</groupId>
59+
<artifactId>api-boot-starter-security-oauth-jwt</artifactId>
60+
</dependency>
61+
<!--ApiBoot Swagger-->
62+
<dependency>
63+
<groupId>org.minbox.framework</groupId>
64+
<artifactId>api-boot-starter-swagger</artifactId>
65+
</dependency>
66+
<!--ApiBoot Http Converter-->
67+
<dependency>
68+
<groupId>org.minbox.framework</groupId>
69+
<artifactId>api-boot-starter-http-converter</artifactId>
70+
</dependency>
71+
<!--ApiBoot Resource Load-->
72+
<dependency>
73+
<groupId>org.minbox.framework</groupId>
74+
<artifactId>api-boot-starter-resource-load</artifactId>
75+
</dependency>
76+
<!--HikariCP-->
77+
<dependency>
78+
<groupId>com.zaxxer</groupId>
79+
<artifactId>HikariCP</artifactId>
80+
</dependency>
81+
<!--ApiBoot Mybatis Enhance-->
82+
<dependency>
83+
<groupId>org.minbox.framework</groupId>
84+
<artifactId>api-boot-starter-mybatis-enhance</artifactId>
85+
</dependency>
86+
<!--ApiBoot Mybatis Pageable-->
87+
<dependency>
88+
<groupId>org.minbox.framework</groupId>
89+
<artifactId>api-boot-starter-mybatis-pageable</artifactId>
90+
</dependency>
91+
92+
<!--MySQL-->
93+
<dependency>
94+
<groupId>mysql</groupId>
95+
<artifactId>mysql-connector-java</artifactId>
96+
</dependency>
97+
<!--Lombok-->
98+
<dependency>
99+
<groupId>org.projectlombok</groupId>
100+
<artifactId>lombok</artifactId>
101+
<optional>true</optional>
102+
</dependency>
103+
<dependency>
104+
<groupId>org.springframework.boot</groupId>
105+
<artifactId>spring-boot-starter-test</artifactId>
106+
<scope>test</scope>
107+
</dependency>
108+
109+
<!--mapStruct依赖-->
110+
<dependency>
111+
<groupId>org.mapstruct</groupId>
112+
<artifactId>mapstruct-jdk8</artifactId>
113+
<version>1.3.0.Final</version>
114+
</dependency>
115+
<dependency>
116+
<groupId>org.mapstruct</groupId>
117+
<artifactId>mapstruct-processor</artifactId>
118+
<version>1.3.0.Final</version>
119+
<scope>provided</scope>
120+
</dependency>
121+
<dependency>
122+
<groupId>javax.inject</groupId>
123+
<artifactId>javax.inject</artifactId>
124+
<version>1</version>
125+
</dependency>
126+
<!--HttpClient-->
127+
<dependency>
128+
<groupId>org.apache.httpcomponents</groupId>
129+
<artifactId>httpclient</artifactId>
130+
<version>4.5.1</version>
131+
</dependency>
132+
</dependencies>
133+
<build>
134+
<plugins>
135+
<plugin>
136+
<groupId>org.springframework.boot</groupId>
137+
<artifactId>spring-boot-maven-plugin</artifactId>
138+
</plugin>
139+
<plugin>
140+
<groupId>org.apache.maven.plugins</groupId>
141+
<artifactId>maven-surefire-plugin</artifactId>
142+
<version>2.18.1</version>
143+
<configuration>
144+
<!--打包跳过测试-->
145+
<skipTests>true</skipTests>
146+
</configuration>
147+
</plugin>
148+
<plugin>
149+
<groupId>org.minbox.framework</groupId>
150+
<artifactId>api-boot-mybatis-enhance-maven-codegen</artifactId>
151+
<version>2.0.7.RELEASE</version>
152+
<dependencies>
153+
<!--数据驱动依赖-->
154+
<dependency>
155+
<groupId>mysql</groupId>
156+
<artifactId>mysql-connector-java</artifactId>
157+
<version>5.1.47</version>
158+
</dependency>
159+
</dependencies>
160+
<executions>
161+
<execution>
162+
<goals>
163+
<goal>generator</goal>
164+
</goals>
165+
</execution>
166+
</executions>
167+
<configuration>
168+
<!--为true时执行自动生成-->
169+
<execute>false</execute>
170+
<dbName>knowledge</dbName>
171+
<dbUrl>jdbc:mysql://localhost:3306</dbUrl>
172+
<dbUserName>root</dbUserName>
173+
<dbPassword>123456</dbPassword>
174+
<packageName>org.minbox.framework.knowledge.library.common.entity</packageName>
175+
<tableNamePattern>kl%</tableNamePattern>
176+
</configuration>
177+
</plugin>
178+
</plugins>
179+
</build>
180+
<dependencyManagement>
181+
<dependencies>
182+
<!--ApiBoot Dependencies-->
183+
<dependency>
184+
<groupId>org.minbox.framework</groupId>
185+
<artifactId>api-boot-dependencies</artifactId>
186+
<version>${api.boot.version}</version>
187+
<scope>import</scope>
188+
<type>pom</type>
189+
</dependency>
190+
</dependencies>
191+
</dependencyManagement>
192+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright [2019] [恒宇少年 - 于起宇]
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
package org.minbox.framework.knowledge.library.common.base;
19+
20+
import com.gitee.hengboy.mybatis.enhance.dsl.factory.EnhanceDslFactory;
21+
import org.springframework.beans.factory.annotation.Autowired;
22+
23+
/**
24+
* Service 基础类
25+
*
26+
* @author:恒宇少年 - 于起宇
27+
* <p>
28+
* DateTime:2019-04-09 13:50
29+
* Blog:http://blog.yuqiyu.com
30+
* WebSite:http://www.jianshu.com/u/092df3f77bca
31+
* Gitee:https://gitee.com/hengboy
32+
* GitHub:https://github.com/hengboy
33+
*/
34+
public class BaseService {
35+
/**
36+
* 动态查询工厂
37+
*/
38+
@Autowired
39+
protected EnhanceDslFactory dslQuery;
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package org.minbox.framework.knowledge.library.common.constants;
2+
3+
/**
4+
* 常量定义
5+
*
6+
* @author:恒宇少年 - 于起宇
7+
* <p>
8+
* DateTime:2019-04-09 13:29
9+
* Blog:http://blog.yuqiyu.com
10+
* WebSite:http://www.jianshu.com/u/092df3f77bca
11+
* Gitee:https://gitee.com/hengboy
12+
* GitHub:https://github.com/hengboy
13+
*/
14+
public interface Constant {
15+
/**
16+
* 是否:是
17+
*/
18+
String YES = "Y";
19+
/**
20+
* 是否:否
21+
*/
22+
String NO = "N";
23+
/**
24+
* 状态:正常
25+
*/
26+
String OK = "O";
27+
/**
28+
* 状态:已删除
29+
*/
30+
String DELETE = "D";
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
package org.minbox.framework.knowledge.library.common.dsl;
2+
import com.gitee.hengboy.mybatis.enhance.dsl.expression.ColumnExpression;
3+
import com.gitee.hengboy.mybatis.enhance.dsl.expression.TableExpression;
4+
import org.minbox.framework.knowledge.library.common.entity.*;
5+
6+
/**
7+
* <p>本类由Code-Builder自动生成</p>
8+
* <p>表名: kl_article_info - 文章信息表 - 动态查询实体</p>
9+
*
10+
* @author Code-Builder
11+
* @since 恒宇少年
12+
* ===============================
13+
* Created with Code-Builder.
14+
* User:
15+
* Date:Apr 10, 2019 1:23:07 PM
16+
* 简书:http://www.jianshu.com/u/092df3f77bca
17+
* 码云:https://gitee.com/hengboy
18+
* GitHub:https://github.com/hengyuboy
19+
* ================================
20+
*/
21+
public class DArticleInfoEntity extends TableExpression<ArticleInfoEntity> {
22+
public DArticleInfoEntity(String root) {
23+
super(root);
24+
}
25+
public static final DArticleInfoEntity DSL(){return new DArticleInfoEntity("kl_article_info");}
26+
public ColumnExpression aiId = new ColumnExpression("AI_ID",this);
27+
public ColumnExpression aiUserId = new ColumnExpression("AI_USER_ID",this);
28+
public ColumnExpression aiTitle = new ColumnExpression("AI_TITLE",this);
29+
public ColumnExpression aiReadCount = new ColumnExpression("AI_READ_COUNT",this);
30+
public ColumnExpression aiLikeCount = new ColumnExpression("AI_LIKE_COUNT",this);
31+
public ColumnExpression aiCommentCount = new ColumnExpression("AI_COMMENT_COUNT",this);
32+
public ColumnExpression aiShareCount = new ColumnExpression("AI_SHARE_COUNT",this);
33+
public ColumnExpression aiContent = new ColumnExpression("AI_CONTENT",this);
34+
public ColumnExpression aiIsOriginal = new ColumnExpression("AI_IS_ORIGINAL",this);
35+
public ColumnExpression aiIsRelease = new ColumnExpression("AI_IS_RELEASE",this);
36+
public ColumnExpression aiIsHot = new ColumnExpression("AI_IS_HOT",this);
37+
public ColumnExpression aiIsTop = new ColumnExpression("AI_IS_TOP",this);
38+
public ColumnExpression aiIsRecommend = new ColumnExpression("AI_IS_RECOMMEND",this);
39+
public ColumnExpression aiIsMarkdown = new ColumnExpression("AI_IS_MARKDOWN",this);
40+
public ColumnExpression aiReleaseTime = new ColumnExpression("AI_RELEASE_TIME",this);
41+
public ColumnExpression aiStatus = new ColumnExpression("AI_STATUS",this);
42+
public ColumnExpression aiMark = new ColumnExpression("AI_MARK",this);
43+
public ColumnExpression aiCreateTime = new ColumnExpression("AI_CREATE_TIME",this);
44+
@Override
45+
public ColumnExpression[] getColumns() {
46+
return new ColumnExpression[]{
47+
aiId
48+
,
49+
aiUserId
50+
,
51+
aiTitle
52+
,
53+
aiReadCount
54+
,
55+
aiLikeCount
56+
,
57+
aiCommentCount
58+
,
59+
aiShareCount
60+
,
61+
aiContent
62+
,
63+
aiIsOriginal
64+
,
65+
aiIsRelease
66+
,
67+
aiIsHot
68+
,
69+
aiIsTop
70+
,
71+
aiIsRecommend
72+
,
73+
aiIsMarkdown
74+
,
75+
aiReleaseTime
76+
,
77+
aiStatus
78+
,
79+
aiMark
80+
,
81+
aiCreateTime
82+
83+
};
84+
}
85+
}

0 commit comments

Comments
 (0)