Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
caopu16
whatsmars
提交
7890a56c
W
whatsmars
项目概览
caopu16
/
whatsmars
与 Fork 源项目一致
Fork自
武汉红喜 / whatsmars
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
whatsmars
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7890a56c
编写于
7月 12, 2020
作者:
武汉红喜
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
upgrade to spring boot 2.3.0
上级
dbd41335
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
3 addition
and
33 deletion
+3
-33
pom.xml
pom.xml
+1
-1
whatsmars-archetypes/whatsmars-initializr/src/main/java/org/hongxi/whatsmars/initializr/controller/InitializrController.java
...whatsmars/initializr/controller/InitializrController.java
+1
-2
whatsmars-archetypes/whatsmars-initializr/src/main/java/org/hongxi/whatsmars/initializr/model/ProjectMeta.java
...va/org/hongxi/whatsmars/initializr/model/ProjectMeta.java
+0
-5
whatsmars-elasticsearch/src/main/java/org/hongxi/whatsmars/elasticsearch/SimpleController.java
.../org/hongxi/whatsmars/elasticsearch/SimpleController.java
+0
-24
whatsmars-mq/whatsmars-mq-kafka-server/pom.xml
whatsmars-mq/whatsmars-mq-kafka-server/pom.xml
+1
-1
未找到文件。
pom.xml
浏览文件 @
7890a56c
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.
1.1
.RELEASE
</version>
<version>
2.
3.0
.RELEASE
</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
whatsmars-archetypes/whatsmars-initializr/src/main/java/org/hongxi/whatsmars/initializr/controller/InitializrController.java
浏览文件 @
7890a56c
...
...
@@ -11,7 +11,6 @@ import org.springframework.util.StringUtils;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
javax.validation.Valid
;
import
java.io.File
;
/**
...
...
@@ -24,7 +23,7 @@ public class InitializrController {
private
static
final
String
CMD
=
"sh generate.sh "
;
@PostMapping
public
ResponseEntity
<
byte
[]>
initialize
(
@Valid
ProjectMeta
projectMeta
)
throws
Exception
{
public
ResponseEntity
<
byte
[]>
initialize
(
ProjectMeta
projectMeta
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
projectMeta
.
getPackageName
()))
{
projectMeta
.
setPackageName
(
projectMeta
.
getGroupId
());
}
...
...
whatsmars-archetypes/whatsmars-initializr/src/main/java/org/hongxi/whatsmars/initializr/model/ProjectMeta.java
浏览文件 @
7890a56c
...
...
@@ -2,19 +2,14 @@ package org.hongxi.whatsmars.initializr.model;
import
lombok.Data
;
import
javax.validation.constraints.NotEmpty
;
/**
* Created by shenhongxi on 2020/7/2.
*/
@Data
public
class
ProjectMeta
{
@NotEmpty
private
String
type
;
@NotEmpty
private
String
groupId
;
@NotEmpty
private
String
artifactId
;
private
String
packageName
;
private
boolean
includeActuator
;
...
...
whatsmars-elasticsearch/src/main/java/org/hongxi/whatsmars/elasticsearch/SimpleController.java
浏览文件 @
7890a56c
...
...
@@ -6,12 +6,7 @@ import org.apache.http.util.EntityUtils;
import
org.elasticsearch.client.Request
;
import
org.elasticsearch.client.Response
;
import
org.elasticsearch.client.RestClient
;
import
org.elasticsearch.index.query.QueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.elasticsearch.core.ElasticsearchTemplate
;
import
org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder
;
import
org.springframework.data.elasticsearch.core.query.SearchQuery
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -28,31 +23,12 @@ public class SimpleController {
private
static
final
String
QUERY_PARAMETER_REST_TOTAL_HITS_AS_INT
=
"rest_total_hits_as_int"
;
private
static
final
String
QUERY_PARAMETER_IGNORE_THROTTLED
=
"ignore_throttled"
;
@Autowired
private
ElasticsearchTemplate
elasticsearchTemplate
;
@Autowired
private
CustomerRepository
repository
;
@Autowired
private
RestClient
restClient
;
@RequestMapping
(
"/indexExists/{indexName}"
)
public
Boolean
indexExists
(
@PathVariable
String
indexName
)
{
return
elasticsearchTemplate
.
indexExists
(
indexName
);
}
@RequestMapping
(
"/search/{indices}"
)
public
List
<
Customer
>
query
(
@PathVariable
String
indices
)
{
QueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
matchQuery
(
"firstName"
,
"Alice"
));
SearchQuery
searchQuery
=
new
NativeSearchQueryBuilder
()
.
withIndices
(
indices
)
.
withQuery
(
queryBuilder
)
.
build
();
return
elasticsearchTemplate
.
queryForList
(
searchQuery
,
Customer
.
class
);
}
@RequestMapping
(
"/save"
)
public
String
testEsRepo
()
{
saveCustomers
();
...
...
whatsmars-mq/whatsmars-mq-kafka-server/pom.xml
浏览文件 @
7890a56c
...
...
@@ -14,7 +14,7 @@
<dependencies>
<dependency>
<groupId>
org.apache.kafka
</groupId>
<artifactId>
kafka_2.1
1
</artifactId>
<artifactId>
kafka_2.1
2
</artifactId>
<version>
${kafka.version}
</version>
</dependency>
<dependency>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录