This commit is contained in:
udf_admin@163.com
2018-11-11 14:23:14 +08:00
parent da5e6b48ed
commit f6fc8fee78
6 changed files with 151 additions and 0 deletions
@@ -0,0 +1,64 @@
<?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-eureka-config-server</artifactId>
<name>udf-eureka-config-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>9001</server.port>
<management.port>8001</management.port>
</properties>
<!-- 依赖 -->
<dependencies>
<!-- spring cloud starter eureka server -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
<!-- spring-cloud-config-server -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<!-- udf-starter-core -->
<dependency>
<groupId>org.itkk.udf</groupId>
<artifactId>udf-starter-core</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>
</plugins>
</build>
</project>
@@ -0,0 +1,17 @@
package org.itkk.udf.eureka.config.server;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
@SpringCloudApplication
@EnableEurekaServer
@EnableConfigServer
public class UdfEurekaConfigServerApplication {
public static void main(String[] args) {
SpringApplication.run(UdfEurekaConfigServerApplication.class, args);
}
}
@@ -0,0 +1,11 @@
.----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. |
| | _____ _____ | || | ________ | || | _________ | |
| ||_ _||_ _|| || | |_ ___ `. | || | |_ ___ | | |
| | | | | | | || | | | `. \ | || | | |_ \_| | |
| | | ' ' | | || | | | | | | || | | _| | |
| | \ `--' / | || | _| |___.' / | || | _| |_ | |
| | `.__.' | || | |________.' | || | |_____| | |
| | | || | | || | | |
| '--------------' || '--------------' || '--------------' |
'----------------' '----------------' '----------------'
@@ -0,0 +1,20 @@
# EUREKA.ENVIRONMENT ( EurekaServerBootstrap )
eureka.environment=${spring.profiles.active}
# EUREKA.INSTANCE ( EurekaInstanceConfigBean )
eureka.instance.preferIpAddress=true
# EUREKA.CLIENT (EurekaClientConfigBean , EurekaServerConfigBean )
eureka.client.enabled=true
eureka.client.serviceUrl.defaultZone=http://127.0.0.1:${server.port}/eureka/
eureka.client.register-with-eureka=true
eureka.client.fetch-registry=true
# spring.cloud.config.server ( ConfigServerProperties )
spring.cloud.config.server.prefix=config-server
# spring.cloud.config.server.git ( MultipleJGitEnvironmentRepository ) ({application}/{profile}/{label})
spring.cloud.config.server.git.uri=https://gitee.com/wangkang/udf.git
spring.cloud.config.server.git.searchPaths=udf-config-repository/{application}
spring.cloud.config.server.git.defaultLabel=master
spring.cloud.config.server.git.forcePull=true
spring.cloud.config.server.git.username=udf_admin@163.com
spring.cloud.config.server.git.password=123456!@#$%^
# LOGGING
logging.file=d:/develop/application-log/${spring.application.name}_${server.port}_${spring.profiles.active}/base.log
@@ -0,0 +1,34 @@
# INFO
info.build.group=${project.groupId}
info.build.artifact=${project.artifactId}
info.build.version=${project.version}
info.build.name=${project.name}
info.build.env=${spring.profiles.active}
info.build.time=${project.build.date}
info.build.encoding=${project.build.sourceEncoding}
info.build.java.source=${java.version}
info.build.java.target=${java.version}
# SPRING
spring.application.name=${project.name}
# HTTP SERVER
server.port=${server.port}
# MANAGEMENT HTTP SERVER (ManagementServerProperties)
#management.server.address=127.0.0.1
management.server.port=${management.port}
# ENDPOINTS WEB CONFIGURATION (WebEndpointProperties)
management.endpoints.web.exposure.include=*
# ENDPOINT
management.endpoint.health.showDetails=always
management.endpoint.shutdown.enabled=true
management.endpoint.restart.enabled=true
management.endpoint.pause.enabled=true
management.endpoint.resume.enabled=true
# JACKSON
#spring.jackson.dateFormat=${org.itkk.application.config.dateFormat}
#spring.jackson.jodaDateTimeFormat=${org.itkk.application.config.dateFormat}
spring.jackson.timeZone=Asia/Shanghai
spring.jackson.serialization.INDENT_OUTPUT=true
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=true
spring.jackson.deserialization.FAIL_ON_UNKNOWN_PROPERTIES=true
spring.jackson.parser.ALLOW_SINGLE_QUOTES=true
spring.jackson.parser.ALLOW_UNQUOTED_CONTROL_CHARS=true
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" />
<jmxConfigurator />
</configuration>