Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
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
openSource
spring-cloud-netflix
Commits
8afda0c4
Commit
8afda0c4
authored
Jul 01, 2018
by
赵天增
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改status.ftl 加上关闭按钮
parent
13c2500d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
221 additions
and
19 deletions
+221
-19
pom.xml
pom.xml
+1
-0
Application.java
...ingframework/cloud/netflix/eureka/server/Application.java
+15
-0
status.ftl
...eka-server/src/main/resources/templates/eureka/status.ftl
+40
-19
pom.xml
testeureka/pom.xml
+134
-0
Application.java
...ureka/src/main/java/com/ztianzeng/eureka/Application.java
+16
-0
application.yml
testeureka/src/main/resources/application.yml
+15
-0
No files found.
pom.xml
View file @
8afda0c4
...
...
@@ -159,6 +159,7 @@
<module>
spring-cloud-netflix-ribbon
</module>
<module>
spring-cloud-starter-netflix
</module>
<module>
docs
</module>
<module>
testeureka
</module>
</modules>
<profiles>
<profile>
...
...
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/Application.java
0 → 100644
View file @
8afda0c4
package
org
.
springframework
.
cloud
.
netflix
.
eureka
.
server
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
@EnableAutoConfiguration
@EnableEurekaServer
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
Application
.
class
,
args
);
}
}
spring-cloud-netflix-eureka-server/src/main/resources/templates/eureka/status.ftl
View file @
8afda0c4
...
...
@@ -3,8 +3,9 @@
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html
class=
"no-js"
>
<!--<![endif]-->
<head>
<!--[if gt IE 8]><!-->
<html
class=
"no-js"
>
<!--<![endif]-->
<head>
<base
href=
"<@spring.url basePath/>"
>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
...
...
@@ -13,17 +14,21 @@
<meta
name=
"viewport"
content=
"width=device-width"
>
<link
rel=
"stylesheet"
href=
"eureka/css/wro.css"
>
</head>
</head>
<body
id=
"one"
>
<body
id=
"one"
>
<
#
include
"
header
.
ftl
"
>
<div
class=
"container-fluid xd-container"
>
<div
class=
"container-fluid xd-container"
>
<
#
include
"
navbar
.
ftl
"
>
<h1>
Instances currently registered with Eureka
</h1>
<table
id=
'instances'
class=
"table table-striped table-hover"
>
<thead>
<tr><th>
Application
</th><th>
AMIs
</th><th>
Availability Zones
</th><th>
Status
</th></tr>
<tr>
<th>
Application
</th>
<th>
AMIs
</th>
<th>
Availability Zones
</th>
<th>
Status
</th>
</tr>
</thead>
<tbody>
<
#
if
apps
?
has_content
>
...
...
@@ -55,13 +60,16 @@
<
#
else
>
${instance.id}
</
#
if><
#
if
instance_has_next
>
,
</
#
if>
<button
id=
"cc"
type=
"button"
onclick=
"close(${instance.id})"
>
关闭
</button>
</
#
list>
</
#
list>
</td>
</tr>
</
#
list>
<
#
else
>
<tr><td
colspan=
"4"
>
No instances available
</td></tr>
<tr>
<td
colspan=
"4"
>
No instances available
</td>
</tr>
</
#
if>
</tbody>
...
...
@@ -71,17 +79,22 @@
<table
id=
'generalInfo'
class=
"table table-striped table-hover"
>
<thead>
<tr><th>
Name
</th><th>
Value
</th></tr>
<tr>
<th>
Name
</th>
<th>
Value
</th>
</tr>
</thead>
<tbody>
<
#
list
statusInfo
.
generalStats
?
keys
as
stat
>
<tr>
<td>
${stat}
</td><td>
${statusInfo.generalStats[stat]!""}
</td>
<td>
${stat}
</td>
<td>
${statusInfo.generalStats[stat]!""}
</td>
</tr>
</
#
list>
<
#
list
statusInfo
.
applicationStats
?
keys
as
stat
>
<tr>
<td>
${stat}
</td><td>
${statusInfo.applicationStats[stat]!""}
</td>
<td>
${stat}
</td>
<td>
${statusInfo.applicationStats[stat]!""}
</td>
</tr>
</
#
list>
</tbody>
...
...
@@ -91,23 +104,31 @@
<table
id=
'instanceInfo'
class=
"table table-striped table-hover"
>
<thead>
<tr><th>
Name
</th><th>
Value
</th></tr>
<tr>
<th>
Name
</th>
<th>
Value
</th>
</tr>
<thead>
<tbody>
<
#
list
instanceInfo
?
keys
as
key
>
<tr>
<td>
${key}
</td><td>
${instanceInfo[key]!""}
</td>
<td>
${key}
</td>
<td>
${instanceInfo[key]!""}
</td>
</tr>
</
#
list>
</tbody>
</table>
</div>
<script
type=
"text/javascript"
src=
"eureka/js/wro.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
</div>
<script
type=
"text/javascript"
src=
"eureka/js/wro.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'#cc'
).
click
(
function
()
{
debugger
;
alert
(
"弹出成功"
)
});
$
(
'table.stripeable tr:odd'
).
addClass
(
'odd'
);
$
(
'table.stripeable tr:even'
).
addClass
(
'even'
);
});
</script>
</body>
</script>
</body>
</html>
testeureka/pom.xml
0 → 100644
View file @
8afda0c4
<?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>
spring-cloud-netflix
</artifactId>
<groupId>
org.springframework.cloud
</groupId>
<version>
2.0.1.BUILD-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
testeureka
</artifactId>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-freemarker
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-commons
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-context
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-netflix-core
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-netflix-eureka-client
</artifactId>
</dependency>
<dependency>
<groupId>
com.netflix.eureka
</groupId>
<artifactId>
eureka-client
</artifactId>
</dependency>
<dependency>
<groupId>
com.sun.jersey
</groupId>
<artifactId>
jersey-servlet
</artifactId>
</dependency>
<dependency>
<groupId>
com.sun.jersey
</groupId>
<artifactId>
jersey-server
</artifactId>
</dependency>
<dependency>
<groupId>
com.netflix.eureka
</groupId>
<artifactId>
eureka-core
</artifactId>
<exclusions>
<exclusion>
<artifactId>
blitz4j
</artifactId>
<groupId>
com.netflix.blitz4j
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.netflix.archaius
</groupId>
<artifactId>
archaius-core
</artifactId>
</dependency>
<!-- archaius dependencies that are now runtime -->
<dependency>
<groupId>
commons-configuration
</groupId>
<artifactId>
commons-configuration
</artifactId>
<optional>
true
</optional>
</dependency>
<!-- end archaius deps -->
<dependency>
<groupId>
javax.inject
</groupId>
<artifactId>
javax.inject
</artifactId>
</dependency>
<!-- Eureka deps that are now optional in eureka -->
<dependency>
<groupId>
com.fasterxml.jackson.dataformat
</groupId>
<artifactId>
jackson-dataformat-xml
</artifactId>
</dependency>
<dependency>
<groupId>
com.thoughtworks.xstream
</groupId>
<artifactId>
xstream
</artifactId>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<!-- Only needed at compile time -->
<scope>
compile
</scope>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-autoconfigure-processor
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.restdocs
</groupId>
<artifactId>
spring-restdocs-restassured
</artifactId>
<scope>
test
</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-contract-wiremock
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-rsa
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-netflix-eureka-server
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
testeureka/src/main/java/com/ztianzeng/eureka/Application.java
0 → 100644
View file @
8afda0c4
package
com
.
ztianzeng
.
eureka
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
@SpringBootApplication
@EnableEurekaClient
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
Application
.
class
,
args
);
}
}
testeureka/src/main/resources/application.yml
0 → 100644
View file @
8afda0c4
spring
:
application
:
name
:
yjy-server-eureka
server
:
port
:
6001
eureka
:
client
:
registerWithEureka
:
false
fetchRegistry
:
false
service-url
:
defaultZone
:
http://localhost:8080/eureka
instance
:
prefer-ip-address
:
true
instance-id
:
${spring.application.name}:${spring.cloud.client.ip-address}:${spring.application.instance_id:${server.port}}
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