修改订单模块项目结构
This commit is contained in:
parent
104e33f5f9
commit
956bdb5396
|
@ -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>
|
||||
|
|
|
@ -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 {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,32 +1,7 @@
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue