Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Kwan的解忧杂货铺@新空间代码工作室
SpringCloud-study
提交
ffd60f0b
S
SpringCloud-study
项目概览
Kwan的解忧杂货铺@新空间代码工作室
/
SpringCloud-study
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SpringCloud-study
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ffd60f0b
编写于
1月 10, 2023
作者:
Q
qinyingjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:config-get模块
上级
a6a3112e
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
113 addition
and
26 deletion
+113
-26
pom.xml
pom.xml
+1
-0
springcloud-service-config-get/pom.xml
springcloud-service-config-get/pom.xml
+42
-0
springcloud-service-config-get/src/main/java/com/kwan/springcloud/ConfigGetApplication.java
.../main/java/com/kwan/springcloud/ConfigGetApplication.java
+15
-0
springcloud-service-config-get/src/main/java/com/kwan/springcloud/controller/ConfigGetController.java
.../com/kwan/springcloud/controller/ConfigGetController.java
+21
-0
springcloud-service-config-get/src/main/resources/bootstrap.properties
...ervice-config-get/src/main/resources/bootstrap.properties
+5
-0
springcloud-service-config-get/src/test/java/com/kwan/springcloud/PortalApplicationTests.java
...est/java/com/kwan/springcloud/PortalApplicationTests.java
+13
-0
springcloud-service-config/pom.xml
springcloud-service-config/pom.xml
+11
-16
springcloud-service-config/src/main/java/com/kwan/springcloud/ConfigApplication.java
...src/main/java/com/kwan/springcloud/ConfigApplication.java
+0
-2
springcloud-service-config/src/main/resources/application.yaml
...gcloud-service-config/src/main/resources/application.yaml
+4
-8
springcloud-service-config/src/main/resources/bootstrap.properties
...ud-service-config/src/main/resources/bootstrap.properties
+0
-0
springcloud-service-portal/pom.xml
springcloud-service-portal/pom.xml
+1
-0
未找到文件。
pom.xml
浏览文件 @
ffd60f0b
...
...
@@ -31,6 +31,7 @@
<module>
springcloud-service-common
</module>
<module>
springcloud-service-portal
</module>
<module>
springcloud-service-config
</module>
<module>
springcloud-service-config-get
</module>
<module>
springcloud-service-feign
</module>
<module>
springcloud-service-eureka
</module>
</modules>
...
...
springcloud-service-config-get/pom.xml
0 → 100644
浏览文件 @
ffd60f0b
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
com.kwan.springcloud
</groupId>
<artifactId>
springcloud-service-parent
</artifactId>
<version>
1.0.0
</version>
</parent>
<artifactId>
springcloud-service-config-get
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<name>
springcloud-service-config-get
</name>
<properties>
<java.version>
1.8
</java.version>
</properties>
<dependencies>
<dependency>
<groupId>
com.kwan.springcloud
</groupId>
<artifactId>
springcloud-service-common
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-config
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
springcloud-service-config-get/src/main/java/com/kwan/springcloud/ConfigGetApplication.java
0 → 100644
浏览文件 @
ffd60f0b
package
com.kwan.springcloud
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
ConfigGetApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ConfigGetApplication
.
class
,
args
);
}
}
springcloud-service-config-get/src/main/java/com/kwan/springcloud/controller/ConfigGetController.java
0 → 100644
浏览文件 @
ffd60f0b
package
com.kwan.springcloud.controller
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cloud.context.config.annotation.RefreshScope
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RefreshScope
@RestController
class
ConfigGetController
{
@Value
(
"${from}"
)
private
String
from
;
@RequestMapping
(
"/from"
)
public
String
from
()
{
return
this
.
from
;
}
}
\ No newline at end of file
springcloud-service-config-get/src/main/resources/bootstrap.properties
0 → 100644
浏览文件 @
ffd60f0b
spring.application.name
=
didispace
spring.cloud.config.profile
=
dev
spring.cloud.config.label
=
master
spring.cloud.config.uri
=
http://localhost:7001/
server.port
=
7002
\ No newline at end of file
springcloud-service-config-get/src/test/java/com/kwan/springcloud/PortalApplicationTests.java
0 → 100644
浏览文件 @
ffd60f0b
package
com.kwan.springcloud
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.boot.test.context.SpringBootTest
;
@SpringBootTest
class
PortalApplicationTests
{
@Test
void
contextLoads
()
{
}
}
springcloud-service-config/pom.xml
浏览文件 @
ffd60f0b
...
...
@@ -14,33 +14,28 @@
<java.version>
1.8
</java.version>
</properties>
<dependencies>
<dependency>
<groupId>
com.kwan.springcloud
</groupId>
<artifactId>
springcloud-service-common
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-server
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-config-server
</artifactId>
<version>
1.4.7.RELEASE
</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
Hoxton.SR12
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
...
...
springcloud-service-config/src/main/java/com/kwan/springcloud/ConfigApplication.java
浏览文件 @
ffd60f0b
...
...
@@ -2,10 +2,8 @@ package com.kwan.springcloud;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.config.server.EnableConfigServer
;
@EnableDiscoveryClient
@EnableConfigServer
@SpringBootApplication
public
class
ConfigApplication
{
...
...
springcloud-service-config/src/main/resources/application.yaml
浏览文件 @
ffd60f0b
...
...
@@ -9,13 +9,9 @@ spring:
config
:
server
:
git
:
uri
:
http://gitcode.net/qyj19920704/springcloud-config
searchPaths
:
config-repo
uri
:
https://gitcode.net/qyj19920704/springcloud-config.git
search-paths
:
-
config-repo
username
:
13113691357
password
:
15671628341qwe
#服务提供者
eureka
:
client
:
service-url
:
defaultZone
:
http://eureka8767:8767/eureka/,http://eureka8768:8768/eureka/,http://eureka8769:8769/eureka/
\ No newline at end of file
label
:
master
\ No newline at end of file
springcloud-service-config/src/main/resources/bootstrap.properties
0 → 100644
浏览文件 @
ffd60f0b
springcloud-service-portal/pom.xml
浏览文件 @
ffd60f0b
...
...
@@ -30,6 +30,7 @@
<artifactId>
spring-cloud-starter-netflix-eureka-server
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录