From 8c85b6051d196c2514f50da8343779eb0035cefe Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Tue, 14 May 2019 14:56:41 +0800 Subject: [PATCH 1/3] add apollo maven dependency --- pom.xml | 64 ++----------------- .../jframework/JframeworkApplication.java | 2 + 2 files changed, 8 insertions(+), 58 deletions(-) diff --git a/pom.xml b/pom.xml index 66f0ee1..4f584fa 100644 --- a/pom.xml +++ b/pom.xml @@ -140,6 +140,12 @@ javase 3.3.0 + + + com.ctrip.framework.apollo + apollo-client + 1.1.0 + @@ -149,64 +155,6 @@ org.springframework.boot spring-boot-maven-plugin - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - - - attach-javadocs - - jar - - - -Xdoclint:none - - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - oss - https://oss.sonatype.org/ - true - - diff --git a/src/main/java/com/github/neatlife/jframework/JframeworkApplication.java b/src/main/java/com/github/neatlife/jframework/JframeworkApplication.java index 1b50b16..8c7162a 100644 --- a/src/main/java/com/github/neatlife/jframework/JframeworkApplication.java +++ b/src/main/java/com/github/neatlife/jframework/JframeworkApplication.java @@ -1,5 +1,6 @@ package com.github.neatlife.jframework; +import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -7,6 +8,7 @@ * @author suxiaolin */ @SpringBootApplication +@EnableApolloConfig public class JframeworkApplication { public static void main(String[] args) { From 000e84e83f5ed29cd4e397698b18c2728186b49e Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Tue, 14 May 2019 18:01:06 +0800 Subject: [PATCH 2/3] placeholder --- k8s.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/k8s.yml b/k8s.yml index 716cfc4..c9bffc7 100644 --- a/k8s.yml +++ b/k8s.yml @@ -12,7 +12,7 @@ } }, "spec": { - "replicas": 1, + "replicas": 3, "selector": { "matchLabels": { "k8s-app": "jframework" @@ -29,7 +29,7 @@ "containers": [ { "name": "jframework", - "image": "registry.cn-hangzhou.aliyuncs.com/suxiaolin/jframework:latest", + "image": "#image#", "readinessProbe": { "httpGet": { "scheme": "HTTP", From e839f5e08499f80f4db51ca23a0ad9fee3f8731e Mon Sep 17 00:00:00 2001 From: suxiaolin Date: Wed, 15 May 2019 13:57:24 +0800 Subject: [PATCH 3/3] apollo --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 69e4417..fd1cdfb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM openjdk:8-jdk-alpine COPY target/jframework.jar /app.jar -ENTRYPOINT ["java", "-jar", "/app.jar", "-Dfile.encoding=utf-8"] \ No newline at end of file +ENTRYPOINT ["java", "-Dfile.encoding=utf-8", "-Xms128m", "-Xmx256m", "-Dapp.id=100001", "-Dapollo.cluster=dev", "-Dapollo.configService=http://192.168.10.160:8880", "-Dapollo.bootstrap.enabled=true", "-jar", "/app.jar"] \ No newline at end of file