init
This commit is contained in:
7
studio/eureka/Dockerfile
Normal file
7
studio/eureka/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM openjdk:8u212-jre-alpine
|
||||
ENV SPRING_PROFILES_ACTIVE=dev
|
||||
ENV TIME_ZONE=Asia/Shanghai
|
||||
COPY ./target/erueka.jar /
|
||||
WORKDIR /
|
||||
EXPOSE 8610
|
||||
CMD ["java","-jar","erueka.jar"]
|
||||
47
studio/eureka/pom.xml
Normal file
47
studio/eureka/pom.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>studio</artifactId>
|
||||
<groupId>com.platform</groupId>
|
||||
<version>0.4.x</version>
|
||||
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>0.4.x</version>
|
||||
<artifactId>eureka</artifactId>
|
||||
<description>eureka</description>
|
||||
|
||||
<dependencies>
|
||||
<!--web 模块-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||
</dependency>
|
||||
<!--服务中心-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.datax.eureka;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
|
||||
|
||||
@EnableEurekaServer
|
||||
@SpringBootApplication
|
||||
public class DataxEurekaApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DataxEurekaApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//package cn.datax.eureka.config;
|
||||
//
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
//
|
||||
//@Configuration
|
||||
//@EnableWebSecurity
|
||||
//class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
// @Override
|
||||
// protected void configure(HttpSecurity http) throws Exception {
|
||||
// http.csrf().disable();
|
||||
// super.configure(http);
|
||||
// }
|
||||
//}
|
||||
21
studio/eureka/src/main/resources/bootstrap.yml
Normal file
21
studio/eureka/src/main/resources/bootstrap.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
server:
|
||||
port: 8610
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: eureka
|
||||
|
||||
eureka:
|
||||
instance:
|
||||
lease-renewal-interval-in-seconds: 20
|
||||
lease-expiration-duration-in-seconds: 60
|
||||
# 设置使用IP
|
||||
prefer-ip-address: true
|
||||
# 设置外网IP号
|
||||
ip-address: 192.168.1.169
|
||||
client:
|
||||
register-with-eureka: false
|
||||
fetch-registry: false
|
||||
instance-info-replication-interval-seconds: 30
|
||||
service-url:
|
||||
defaultZone: http://192.168.1.169:8610/eureka/
|
||||
Reference in New Issue
Block a user