Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eureka-server
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cmiov005
eureka-server
Commits
5403a855
Commit
5403a855
authored
Jun 20, 2019
by
houg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置
parent
c6a77788
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
37 deletions
+3
-37
TestController.java
...ain/java/com/enovate/newretail/eureka/TestController.java
+0
-29
application-dev.properties
src/main/resources/application-dev.properties
+0
-3
application.yml
src/main/resources/application.yml
+3
-5
No files found.
src/main/java/com/enovate/newretail/eureka/TestController.java
deleted
100644 → 0
View file @
c6a77788
package
com
.
enovate
.
newretail
.
eureka
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ctrip.framework.apollo.Config
;
import
com.ctrip.framework.apollo.spring.annotation.ApolloConfig
;
@RestController
@RequestMapping
(
path
=
"/config"
)
public
class
TestController
{
@ApolloConfig
private
Config
config
;
@RequestMapping
(
path
=
"/get/{key}"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
String
get
(
@PathVariable
(
"key"
)
String
key
)
{
return
config
.
getProperty
(
key
,
config
.
getSourceType
().
name
());
}
@RequestMapping
(
path
=
"/value"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
String
value
()
{
return
null
;
}
}
src/main/resources/application-dev.properties
deleted
100644 → 0
View file @
c6a77788
eureka.instance.hostname
=
localhost
eureka.client.serviceUrl.defaultZone
=
http://localhost:${server.port}/eureka/
\ No newline at end of file
src/main/resources/application.yml
View file @
5403a855
spring
:
spring
:
application
:
application
:
name
:
eureka-server
name
:
eureka-server
profiles
:
active
:
apollo-env.properties
server
:
server
:
port
:
8761
port
:
8761
servlet
:
servlet
:
...
@@ -8,17 +10,13 @@ server:
...
@@ -8,17 +10,13 @@ server:
app
:
app
:
id:evonate-newretail-eureka
id:evonate-newretail-eureka
spring
:
profiles
:
active
:
apollo-env.properties
#表示是否将自己注册到Eureka Server上,默认为true
#表示是否将自己注册到Eureka Server上,默认为true
eureka
:
eureka
:
client
:
client
:
registerWithEureka
:
false
registerWithEureka
:
false
#表示是否从Eureka Server上获取注册信息,默认为true
#表示是否从Eureka Server上获取注册信息,默认为true
fetchRegistry
:
false
fetchRegistry
:
false
serviceUrl
:
serviceUrl
:
defaultZone
:
http://localhost:${server.port}/register/eureka/
defaultZone
:
http://localhost:${server.port}/register/eureka/
instance
:
instance
:
hostname
:
localhost
hostname
:
localhost
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment