Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
956bdb53
提交
956bdb53
authored
5月 08, 2020
作者:
xiaofeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改订单模块项目结构
上级
104e33f5
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
21 行增加
和
113 行删除
+21
-113
pom.xml
order/order-application/pom.xml
+2
-75
OrderApplication.java
...a/cn/iocoder/mall/order/application/OrderApplication.java
+15
-9
application.yaml
order/order-application/src/main/resources/application.yaml
+4
-29
没有找到文件。
order/order-application/pom.xml
浏览文件 @
956bdb53
...
...
@@ -15,89 +15,16 @@
<!-- Mall 相关 -->
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
common-framework
</artifactId>
<artifactId>
order-rest
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
mall-spring-boot
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
order-service-impl
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
system-sdk
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
user-sdk
</artifactId>
<artifactId>
order-rpc
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
swagger-bootstrap-ui
</artifactId>
</dependency>
<!-- 服务保障相关 -->
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-sentinel
</artifactId>
</dependency>
<!-- 监控相关 -->
<dependency>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-starter-client
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
io.micrometer
</groupId>
<artifactId>
micrometer-registry-prometheus
</artifactId>
</dependency>
<!-- 测试相关 -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- 提供给 mapstruct 使用 -->
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
</plugin>
<!-- 打包 -->
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
order/order-application/src/main/java/cn/iocoder/mall/order/application/OrderApplication.java
浏览文件 @
956bdb53
...
...
@@ -3,6 +3,7 @@ package cn.iocoder.mall.order.application;
import
org.apache.catalina.connector.Connector
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.config.ConfigFileApplicationListener
;
import
org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer
;
import
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
;
import
org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory
;
...
...
@@ -11,16 +12,23 @@ import org.springframework.context.annotation.Bean;
@SpringBootApplication
(
scanBasePackages
=
{
"cn.iocoder.mall.order"
})
public
class
OrderApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
OrderApplication
.
class
,
args
);
}
/**
* 设置需要读取的配置文件的名字。 基于 {@link org.springframework.boot.context.config.ConfigFileApplicationListener#CONFIG_NAME_PROPERTY}
* 实现。
*/
private
static
final
String
CONFIG_NAME_VALUE
=
"biz,rest,rpc,application"
;
public
static
void
main
(
String
[]
args
)
{
// 设置环境变量
System
.
setProperty
(
ConfigFileApplicationListener
.
CONFIG_NAME_PROPERTY
,
CONFIG_NAME_VALUE
);
SpringApplication
.
run
(
OrderApplication
.
class
,
args
);
}
/**
* 解决异常信息:
*
java.lang.IllegalArgumentException:
*
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
* 解决异常信息:
java.lang.IllegalArgumentException: Invalid character found in the request target.
*
The valid characters are defined in RFC 7230 and RFC 3986
*
* @return
*/
@Bean
...
...
@@ -36,5 +44,4 @@ public class OrderApplication {
}
}
\ No newline at end of file
}
order/order-application/src/main/resources/application.yaml
浏览文件 @
956bdb53
spring
:
# Application 的配置项
application
:
name
:
order-application
# Spring Cloud 配置项
cloud
:
# Spring Cloud Sentinel 配置项
sentinel
:
transport
:
dashboard
:
s1.iocoder.cn:12088
# Sentinel Dashboard 服务地址
eager
:
true
# 项目启动时,直接连接到 Sentinel
# server
server
:
port
:
18088
servlet
:
context-path
:
/order-api/
swagger
:
enable
:
true
# 暂时不去掉
title
:
订单子系统
description
:
订单子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.order.application.controller
management
:
endpoints
:
web
:
exposure
:
include
:
health,info,env,metrics,prometheus
metrics
:
enabled
:
true
# Profile 的配置项
profiles
:
active
:
local
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论