mirror of
https://gitee.com/wangkang/udf.git
synced 2026-10-29 23:03:40 +00:00
添加udf网关
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
########################################################
|
||||
###org.itkk.application.config (ApplicationConfig)
|
||||
########################################################
|
||||
org.itkk.application.config.outputExceptionStackTrace=true
|
||||
org.itkk.application.config.threadPool.poolSize=100
|
||||
########################################################
|
||||
###LOGGING (must reboot)
|
||||
########################################################
|
||||
logging.file=d:/develop/application-log/${spring.application.name}_${server.port}_${spring.profiles.active}/base.log
|
||||
########################################################
|
||||
###zuul ( ZuulProperties )
|
||||
########################################################
|
||||
zuul.retryable=true
|
||||
########################################################
|
||||
###zuul routes to url ( ZuulProperties )
|
||||
########################################################
|
||||
zuul.routes.udf_general_server.path=/udf/general/**
|
||||
zuul.routes.udf_general_server.serviceId=UDF-GENERAL-SERVER
|
||||
@@ -31,6 +31,7 @@
|
||||
<module>udf-eureka-config-server</module>
|
||||
<module>udf-admin-server</module>
|
||||
<module>udf-general-server</module>
|
||||
<module>udf-zuul-server</module>
|
||||
</modules>
|
||||
<!-- 环境 -->
|
||||
<profiles>
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!-- maven坐标 -->
|
||||
<artifactId>udf-zuul-server</artifactId>
|
||||
<name>udf-zuul-server</name>
|
||||
<packaging>jar</packaging>
|
||||
<url>http://itkk.org:81</url>
|
||||
<!-- 父依赖 -->
|
||||
<parent>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-server</artifactId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
<!-- 参数 -->
|
||||
<properties>
|
||||
<server.port>9004</server.port>
|
||||
<management.port>8004</management.port>
|
||||
</properties>
|
||||
<!-- 依赖 -->
|
||||
<dependencies>
|
||||
<!-- spring-boot-starter-test -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- udf-starter-core -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-core</artifactId>
|
||||
</dependency>
|
||||
<!-- udf-starter-exception-alert -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-exception-alert</artifactId>
|
||||
</dependency>
|
||||
<!-- udf-starter-swagger2 -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-swagger2</artifactId>
|
||||
</dependency>
|
||||
<!-- udf-starter-cors -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-cors</artifactId>
|
||||
</dependency>
|
||||
<!-- udf-starter-rms -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-rms</artifactId>
|
||||
</dependency>
|
||||
<!-- udf-starter-auth -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-auth</artifactId>
|
||||
</dependency>
|
||||
<!-- spring-cloud-starter-zuul 服务网关 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
|
||||
</dependency>
|
||||
<!-- udf-starter-amqp-rabbitmq -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-amqp-rabbitmq</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- 构建 -->
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/main/resources/</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<!-- package -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- docker -->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<imageName>${docker.registry.host}/${project.groupId}/${project.artifactId}:latest</imageName>
|
||||
<baseImage>${docker.java.base.image}</baseImage>
|
||||
<maintainer>${docker.maintainer}</maintainer>
|
||||
<exposes>${server.port}</exposes>
|
||||
<cmd></cmd>
|
||||
<entryPoint>["java","-jar","/${project.build.finalName}.jar"]</entryPoint>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package org.itkk.udf.zuul.server;
|
||||
|
||||
import org.itkk.udf.core.BaseApplication;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.cloud.client.SpringCloudApplication;
|
||||
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
/**
|
||||
* 描述 : 系统入口
|
||||
*
|
||||
* @author wangkang
|
||||
*/
|
||||
@SpringCloudApplication
|
||||
@EnableZuulProxy
|
||||
@ComponentScan(basePackages = {"org.itkk"})
|
||||
public class UdfZuulServerApplication extends BaseApplication {
|
||||
|
||||
/**
|
||||
* 描述 : spring boot的入口,在整个项目中,包括其子项目在内, 只能有一个main方法,否则spring boot启动不起来
|
||||
*
|
||||
* @param args 参数
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(UdfZuulServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
########################################################
|
||||
###eureka.client ( EurekaInstanceConfigBean , EurekaClientConfigBean , EurekaServerConfigBean ) (must reboot)
|
||||
########################################################
|
||||
eureka.instance.preferIpAddress=true
|
||||
eureka.client.serviceUrl.defaultZone=http://admin:123456@127.0.0.1:9001/eureka/
|
||||
########################################################
|
||||
###spring.cloud.config ( ConfigClientProperties )
|
||||
########################################################
|
||||
spring.cloud.config.username=admin
|
||||
spring.cloud.config.password=123456
|
||||
spring.cloud.config.enabled=true
|
||||
spring.cloud.config.profile=${spring.profiles.active}
|
||||
spring.cloud.config.name=${spring.application.name},base,gzip,cors,rms,rms-manager,rabbitmq,hystrix,ribbon,redis,exception-alert,weixin-mp
|
||||
spring.cloud.config.label=master
|
||||
spring.cloud.config.failFast=true
|
||||
spring.cloud.config.discovery.enabled=true
|
||||
spring.cloud.config.discovery.serviceId=UDF-EUREKA-CONFIG-SERVER
|
||||
@@ -0,0 +1,39 @@
|
||||
########################################################
|
||||
###INFO ( note : info.build.time is the UTC time )
|
||||
########################################################
|
||||
info.build.group=${project.groupId}
|
||||
info.build.artifact=${project.artifactId}
|
||||
info.build.version=${project.version}
|
||||
info.build.name=${project.name}
|
||||
info.build.time=${project.build.date}
|
||||
info.build.encoding=${project.build.sourceEncoding}
|
||||
info.build.java.source=${java.version}
|
||||
info.build.java.target=${java.version}
|
||||
########################################################
|
||||
###IDENTITY
|
||||
########################################################
|
||||
spring.application.name=${project.name}
|
||||
########################################################
|
||||
###WEB PROPERTIES (ServerProperties)
|
||||
########################################################
|
||||
server.port=${server.port}
|
||||
########################################################
|
||||
###MANAGEMENT (ManagementServerProperties)
|
||||
########################################################
|
||||
management.security.enabled=false
|
||||
########################################################
|
||||
###PROFILES
|
||||
########################################################
|
||||
spring.profiles.active=${profiles.activation}
|
||||
########################################################
|
||||
###org.itkk.application.config (ApplicationConfig) (must reboot)
|
||||
########################################################
|
||||
org.itkk.application.config.encoding=UTF-8
|
||||
org.itkk.application.config.timeZone=Asia/Shanghai
|
||||
org.itkk.application.config.dateFormat=yyyy-MM-dd'T'HH:mm:ss:SSSZ
|
||||
########################################################
|
||||
### shutdown
|
||||
########################################################
|
||||
endpoints.shutdown.enabled=true
|
||||
endpoints.shutdown.sensitive=true
|
||||
management.port=${management.port}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml" />
|
||||
<jmxConfigurator />
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user