Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-admin
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-boot-admin
Commits
47d8e174
Commit
47d8e174
authored
May 04, 2015
by
Johannes Stelzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added spring-boot-configuration-processor and addiotional metadata for ConfigurationProperties
parent
39e77e6f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
37 deletions
+94
-37
pom.xml
spring-boot-admin-server/pom.xml
+5
-0
additional-spring-configuration-metadata.json
...es/META-INF/additional-spring-configuration-metadata.json
+36
-0
pom.xml
spring-boot-admin-starter-client/pom.xml
+5
-0
LogfileMvcEndpoint.java
...de/codecentric/boot/admin/actuate/LogfileMvcEndpoint.java
+12
-0
AdminClientProperties.java
.../codecentric/boot/admin/config/AdminClientProperties.java
+18
-18
AdminProperties.java
...ava/de/codecentric/boot/admin/config/AdminProperties.java
+18
-19
No files found.
spring-boot-admin-server/pom.xml
View file @
47d8e174
...
...
@@ -25,6 +25,11 @@
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
</dependency>
<!-- Use Zuul WITHOUT Hystrix/Ribbon/Config Client -->
<dependency>
...
...
spring-boot-admin-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json
0 → 100644
View file @
47d8e174
{
"groups"
:
[
{
"name"
:
"spring.boot.admin.hazelcast"
,
"sourceType"
:
"de.codecentric.boot.admin.config.AdminServerWebConfiguration.HazelcastStoreConfiguration"
},
{
"name"
:
"spring.boot.admin.discovery"
,
"sourceType"
:
"de.codecentric.boot.admin.config.AdminServerWebConfiguration.DiscoveryClientConfiguration"
}
],
"properties"
:
[
{
"name"
:
"spring.boot.admin.hazelcast.enabled"
,
"type"
:
"java.lang.Boolean"
,
"description"
:
"Enable Hazelcast support."
,
"defaultValue"
:
"true"
},
{
"name"
:
"spring.boot.admin.hazelcast.map"
,
"type"
:
"java.lang.String"
,
"description"
:
"Name of backing Hazelcast-Map"
,
"defaultValue"
:
"spring-boot-admin-application-store"
},
{
"name"
:
"spring.boot.admin.discovery.enabled"
,
"type"
:
"java.lang.Boolean"
,
"description"
:
"Enable Spring Cloud Discovery support."
,
"defaultValue"
:
"true"
},
{
"name"
:
"spring.boot.admin.discovery.management.context-path"
,
"type"
:
"java.lang.String"
,
"description"
:
"management-path suffix for discovered applications"
,
"defaultValue"
:
""
}
]
\ No newline at end of file
spring-boot-admin-starter-client/pom.xml
View file @
47d8e174
...
...
@@ -26,6 +26,11 @@
<artifactId>
spring-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.jolokia
</groupId>
<artifactId>
jolokia-core
</artifactId>
</dependency>
...
...
spring-boot-admin-starter-client/src/main/java/de/codecentric/boot/admin/actuate/LogfileMvcEndpoint.java
View file @
47d8e174
...
...
@@ -44,13 +44,25 @@ public class LogfileMvcEndpoint implements MvcEndpoint {
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
LogfileMvcEndpoint
.
class
);
/**
* Logfile to serve at this endpoint. Defaults to ${logging.file}.
*/
@Value
(
"${logging.file}"
)
private
String
logfile
;
/**
* Path of the logfile-endpoint
*/
private
String
path
=
"/logfile"
;
/**
* Is the logfile endpoint sensitive
*/
private
boolean
sensitive
=
true
;
/**
* Enable the logfile endpoint
*/
private
boolean
enabled
=
true
;
@Override
...
...
spring-boot-admin-starter-client/src/main/java/de/codecentric/boot/admin/config/AdminClientProperties.java
View file @
47d8e174
...
...
@@ -37,10 +37,27 @@ import org.springframework.util.StringUtils;
@Order
(
Ordered
.
LOWEST_PRECEDENCE
-
100
)
public
class
AdminClientProperties
implements
ApplicationListener
<
ApplicationEvent
>
{
/**
* Client-management-URL to register with. Inferred at runtime, can be overriden in
* case the reachable URL is different (e.g. Docker).
*/
private
String
managementUrl
;
/**
* Client-service-URL register with. Inferred at runtime, can be overriden in case the
* reachable URL is different (e.g. Docker).
*/
private
String
serviceUrl
;
/**
* Client-health-URL to register with. Inferred at runtime, can be overriden in case
* the reachable URL is different (e.g. Docker). Must be unique in registry.
*/
private
String
healthUrl
;
/**
* Name to register with. Defaults to ${spring.application.name}
*/
@Value
(
"${spring.application.name:spring-boot-application}"
)
private
String
name
;
...
...
@@ -90,11 +107,6 @@ public class AdminClientProperties implements ApplicationListener<ApplicationEve
return
false
;
}
/**
* @return Client-management-URL to register with. Can be overriden in case the
* reachable URL is different (e.g. Docker). Must be unique in registry.
*/
public
String
getManagementUrl
()
{
if
(
managementUrl
==
null
)
{
if
(
managementPort
!=
-
1
)
{
...
...
@@ -113,11 +125,6 @@ public class AdminClientProperties implements ApplicationListener<ApplicationEve
this
.
managementUrl
=
managementUrl
;
}
/**
* @return Client-health-URL to register with. Can be overriden in case the reachable
* URL is different (e.g. Docker). Must be unique in registry.
*/
public
String
getHealthUrl
()
{
if
(
healthUrl
==
null
)
{
return
append
(
getManagementUrl
(),
healthEndpointId
);
...
...
@@ -129,10 +136,6 @@ public class AdminClientProperties implements ApplicationListener<ApplicationEve
this
.
healthUrl
=
healthUrl
;
}
/**
* @return Client-service-URL to register with. Can be overriden in case the reachable
* URL is different (e.g. Docker). Must be unique in registry.
*/
public
String
getServiceUrl
()
{
if
(
serviceUrl
==
null
)
{
if
(
serverPort
!=
-
1
){
...
...
@@ -154,9 +157,6 @@ public class AdminClientProperties implements ApplicationListener<ApplicationEve
return
serverInitialized
;
}
/**
* @return Name to register with.
*/
public
String
getName
()
{
return
name
;
}
...
...
@@ -176,7 +176,7 @@ public class AdminClientProperties implements ApplicationListener<ApplicationEve
private
String
createLocalUri
(
int
port
,
String
path
)
{
String
scheme
=
server
.
getSsl
()
!=
null
&&
server
.
getSsl
().
isEnabled
()
?
"https"
:
"http"
;
return
append
(
scheme
+
"://"
+
getHostname
()
+
":"
+
port
+
"/"
,
path
);
return
append
(
scheme
+
"://"
+
getHostname
()
+
":"
+
port
+
"/"
,
path
);
}
private
String
append
(
String
uri
,
String
path
)
{
...
...
spring-boot-admin-starter-client/src/main/java/de/codecentric/boot/admin/config/AdminProperties.java
View file @
47d8e174
...
...
@@ -20,32 +20,43 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties
(
prefix
=
"spring.boot.admin"
)
public
class
AdminProperties
{
/**
* The admin servers url to register at
*/
private
String
url
;
/**
* The admin servers context path.
*/
private
String
contextPath
=
"api/applications"
;
/**
* Time interval (in ms) the registration is repeated
*/
private
int
period
=
10000
;
/**
* Username for basic authentication on admin server
*/
private
String
username
;
/**
* Password for basic authentication on admin server
*/
private
String
password
;
/**
* Enable automatic deregistration on shutdown
*/
private
boolean
autoDeregistration
;
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
/**
* @return the Spring Boot Admin Server's url.
*/
public
String
getUrl
()
{
return
url
;
}
/**
* @return the Spring Boot Admin Server's context path.
*/
public
String
getContextPath
()
{
return
contextPath
;
}
...
...
@@ -54,9 +65,6 @@ public class AdminProperties {
this
.
contextPath
=
contextPath
;
}
/**
* @return the time interval (in ms) the registration is repeated.
*/
public
int
getPeriod
()
{
return
period
;
}
...
...
@@ -69,9 +77,6 @@ public class AdminProperties {
this
.
username
=
username
;
}
/**
* @return username for basic authentication .
*/
public
String
getUsername
()
{
return
username
;
}
...
...
@@ -80,16 +85,10 @@ public class AdminProperties {
this
.
password
=
password
;
}
/**
* @return password for basic authentication.
*/
public
String
getPassword
()
{
return
password
;
}
/**
* @return wether the application deregisters automatically on shutdown.
*/
public
boolean
isAutoDeregistration
()
{
return
autoDeregistration
;
}
...
...
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