Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
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
DEMO
spring-boot
Commits
273beaa3
Commit
273beaa3
authored
Dec 30, 2016
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
f8acaae1
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
39 additions
and
44 deletions
+39
-44
CacheManagerCustomizers.java
...ork/boot/autoconfigure/cache/CacheManagerCustomizers.java
+4
-5
CacheManagerCustomizersTests.java
...oot/autoconfigure/cache/CacheManagerCustomizersTests.java
+1
-2
SampleActuatorLog4J2ApplicationTests.java
...actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java
+4
-3
pom.xml
...ng-boot-samples/spring-boot-sample-actuator-noweb/pom.xml
+3
-2
pom.xml
spring-boot-samples/spring-boot-sample-actuator/pom.xml
+4
-17
HelloWorldService.java
...ator/src/main/java/sample/actuator/HelloWorldService.java
+1
-1
SampleFlywayApplication.java
.../src/main/java/sample/flyway/SampleFlywayApplication.java
+2
-0
pom.xml
spring-boot-samples/spring-boot-sample-integration/pom.xml
+3
-2
pom.xml
spring-boot-samples/spring-boot-sample-jersey/pom.xml
+0
-1
pom.xml
...oot-samples/spring-boot-sample-metrics-dropwizard/pom.xml
+5
-3
SampleController.java
...main/java/sample/metrics/dropwizard/SampleController.java
+4
-3
pom.xml
...-boot-samples/spring-boot-sample-metrics-opentsdb/pom.xml
+3
-2
pom.xml
spring-boot-samples/spring-boot-sample-metrics-redis/pom.xml
+5
-3
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheManagerCustomizers.java
View file @
273beaa3
...
@@ -41,9 +41,9 @@ public class CacheManagerCustomizers {
...
@@ -41,9 +41,9 @@ public class CacheManagerCustomizers {
public
CacheManagerCustomizers
(
public
CacheManagerCustomizers
(
List
<?
extends
CacheManagerCustomizer
<?>>
customizers
)
{
List
<?
extends
CacheManagerCustomizer
<?>>
customizers
)
{
this
.
customizers
=
(
customizers
!=
null
?
this
.
customizers
=
(
customizers
!=
null
new
ArrayList
<
CacheManagerCustomizer
<?>>(
customizers
)
:
?
new
ArrayList
<
CacheManagerCustomizer
<?>>(
customizers
)
Collections
.<
CacheManagerCustomizer
<?>>
emptyList
());
:
Collections
.<
CacheManagerCustomizer
<?>>
emptyList
());
}
}
/**
/**
...
@@ -57,8 +57,7 @@ public class CacheManagerCustomizers {
...
@@ -57,8 +57,7 @@ public class CacheManagerCustomizers {
public
<
T
extends
CacheManager
>
T
customize
(
T
cacheManager
)
{
public
<
T
extends
CacheManager
>
T
customize
(
T
cacheManager
)
{
for
(
CacheManagerCustomizer
<?>
customizer
:
this
.
customizers
)
{
for
(
CacheManagerCustomizer
<?>
customizer
:
this
.
customizers
)
{
Class
<?>
generic
=
ResolvableType
Class
<?>
generic
=
ResolvableType
.
forClass
(
CacheManagerCustomizer
.
class
,
.
forClass
(
CacheManagerCustomizer
.
class
,
customizer
.
getClass
())
customizer
.
getClass
())
.
resolveGeneric
();
.
resolveGeneric
();
if
(
generic
.
isInstance
(
cacheManager
))
{
if
(
generic
.
isInstance
(
cacheManager
))
{
customize
(
cacheManager
,
customizer
);
customize
(
cacheManager
,
customizer
);
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheManagerCustomizersTests.java
View file @
273beaa3
...
@@ -37,8 +37,7 @@ public class CacheManagerCustomizersTests {
...
@@ -37,8 +37,7 @@ public class CacheManagerCustomizersTests {
@Test
@Test
public
void
customizeWithNullCustomizersShouldDoNothing
()
{
public
void
customizeWithNullCustomizersShouldDoNothing
()
{
new
CacheManagerCustomizers
(
null
)
new
CacheManagerCustomizers
(
null
).
customize
(
mock
(
CacheManager
.
class
));
.
customize
(
mock
(
CacheManager
.
class
));
}
}
@Test
@Test
...
...
spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java
View file @
273beaa3
...
@@ -46,7 +46,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
...
@@ -46,7 +46,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@AutoConfigureMockMvc
@AutoConfigureMockMvc
public
class
SampleActuatorLog4J2ApplicationTests
{
public
class
SampleActuatorLog4J2ApplicationTests
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
SampleActuatorLog4J2ApplicationTests
.
class
);
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
SampleActuatorLog4J2ApplicationTests
.
class
);
@Rule
@Rule
public
OutputCapture
output
=
new
OutputCapture
();
public
OutputCapture
output
=
new
OutputCapture
();
...
@@ -64,8 +65,8 @@ public class SampleActuatorLog4J2ApplicationTests {
...
@@ -64,8 +65,8 @@ public class SampleActuatorLog4J2ApplicationTests {
public
void
validateLoggersEndpoint
()
throws
Exception
{
public
void
validateLoggersEndpoint
()
throws
Exception
{
this
.
mvc
.
perform
(
get
(
"/loggers/org.apache.coyote.http11.Http11NioProtocol"
))
this
.
mvc
.
perform
(
get
(
"/loggers/org.apache.coyote.http11.Http11NioProtocol"
))
.
andExpect
(
status
().
isOk
())
.
andExpect
(
status
().
isOk
())
.
andExpect
(
content
().
string
(
equalTo
(
.
andExpect
(
content
().
string
(
equalTo
(
"{\"configuredLevel\":\"WARN\","
"{\"configuredLevel\":\"WARN\","
+
"\"effectiveLevel\":\"WARN\"}"
)));
+
"\"effectiveLevel\":\"WARN\"}"
)));
}
}
}
}
spring-boot-samples/spring-boot-sample-actuator-noweb/pom.xml
View file @
273beaa3
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<main.basedir>
${basedir}/../..
</main.basedir>
<main.basedir>
${basedir}/../..
</main.basedir>
</properties>
</properties>
<dependencies>
<dependencies>
<!-- Compile -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
...
@@ -27,13 +28,13 @@
...
@@ -27,13 +28,13 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-remote-shell
</artifactId>
<artifactId>
spring-boot-starter-remote-shell
</artifactId>
</dependency>
</dependency>
<!-- Optional -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
<optional>
true
</optional>
</dependency>
</dependency>
<!-- Test -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
...
...
spring-boot-samples/spring-boot-sample-actuator/pom.xml
View file @
273beaa3
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<main.basedir>
${basedir}/../..
</main.basedir>
<main.basedir>
${basedir}/../..
</main.basedir>
</properties>
</properties>
<dependencies>
<dependencies>
<!-- Compile -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
...
@@ -39,38 +40,24 @@
...
@@ -39,38 +40,24 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-remote-shell
</artifactId>
<artifactId>
spring-boot-starter-remote-shell
</artifactId>
</dependency>
</dependency>
<!-- Runtime -->
<dependency>
<dependency>
<groupId>
com.h2database
</groupId>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
<artifactId>
h2
</artifactId>
<scope>
runtime
</scope>
<scope>
runtime
</scope>
</dependency>
</dependency>
<!-- Optional -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
<optional>
true
</optional>
</dependency>
</dependency>
<!-- Test -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<!-- <dependency>
<groupId>org.crashub</groupId>
<artifactId>crash.connectors.telnet</artifactId>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency> -->
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
spring-boot-samples/spring-boot-sample-actuator/src/main/java/sample/actuator/HelloWorldService.java
View file @
273beaa3
/*
/*
* Copyright 2012-201
3
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-samples/spring-boot-sample-flyway/src/main/java/sample/flyway/SampleFlywayApplication.java
View file @
273beaa3
...
@@ -31,10 +31,12 @@ public class SampleFlywayApplication {
...
@@ -31,10 +31,12 @@ public class SampleFlywayApplication {
@Bean
@Bean
public
CommandLineRunner
runner
(
final
PersonRepository
repository
)
{
public
CommandLineRunner
runner
(
final
PersonRepository
repository
)
{
return
new
CommandLineRunner
()
{
return
new
CommandLineRunner
()
{
@Override
@Override
public
void
run
(
String
...
args
)
throws
Exception
{
public
void
run
(
String
...
args
)
throws
Exception
{
System
.
err
.
println
(
repository
.
findAll
());
System
.
err
.
println
(
repository
.
findAll
());
}
}
};
};
}
}
...
...
spring-boot-samples/spring-boot-sample-integration/pom.xml
View file @
273beaa3
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<main.basedir>
${basedir}/../..
</main.basedir>
<main.basedir>
${basedir}/../..
</main.basedir>
</properties>
</properties>
<dependencies>
<dependencies>
<!-- Compile -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-integration
</artifactId>
<artifactId>
spring-boot-starter-integration
</artifactId>
...
@@ -27,13 +28,13 @@
...
@@ -27,13 +28,13 @@
<groupId>
org.springframework.integration
</groupId>
<groupId>
org.springframework.integration
</groupId>
<artifactId>
spring-integration-file
</artifactId>
<artifactId>
spring-integration-file
</artifactId>
</dependency>
</dependency>
<!-- Optional -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
<optional>
true
</optional>
</dependency>
</dependency>
<!-- Test -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
...
...
spring-boot-samples/spring-boot-sample-jersey/pom.xml
View file @
273beaa3
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<scope>
provided
</scope>
<scope>
provided
</scope>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
...
...
spring-boot-samples/spring-boot-sample-metrics-dropwizard/pom.xml
View file @
273beaa3
<?xml version="1.0" encoding="UTF-8"?>
<?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"
>
<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"
>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<parent>
<!-- Your own application should inherit from spring-boot-starter-parent -->
<!-- Your own application should inherit from spring-boot-starter-parent -->
...
@@ -19,6 +20,7 @@
...
@@ -19,6 +20,7 @@
<main.basedir>
${basedir}/../..
</main.basedir>
<main.basedir>
${basedir}/../..
</main.basedir>
</properties>
</properties>
<dependencies>
<dependencies>
<!-- Compile -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
...
@@ -31,13 +33,13 @@
...
@@ -31,13 +33,13 @@
<groupId>
io.dropwizard.metrics
</groupId>
<groupId>
io.dropwizard.metrics
</groupId>
<artifactId>
metrics-core
</artifactId>
<artifactId>
metrics-core
</artifactId>
</dependency>
</dependency>
<!-- Optional -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
<optional>
true
</optional>
</dependency>
</dependency>
<!-- Test -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
...
...
spring-boot-samples/spring-boot-sample-metrics-dropwizard/src/main/java/sample/metrics/dropwizard/SampleController.java
View file @
273beaa3
...
@@ -33,7 +33,8 @@ public class SampleController {
...
@@ -33,7 +33,8 @@ public class SampleController {
private
final
GaugeService
gauges
;
private
final
GaugeService
gauges
;
public
SampleController
(
HelloWorldProperties
helloWorldProperties
,
GaugeService
gauges
)
{
public
SampleController
(
HelloWorldProperties
helloWorldProperties
,
GaugeService
gauges
)
{
this
.
helloWorldProperties
=
helloWorldProperties
;
this
.
helloWorldProperties
=
helloWorldProperties
;
this
.
gauges
=
gauges
;
this
.
gauges
=
gauges
;
}
}
...
@@ -42,8 +43,8 @@ public class SampleController {
...
@@ -42,8 +43,8 @@ public class SampleController {
@ResponseBody
@ResponseBody
public
Map
<
String
,
String
>
hello
()
{
public
Map
<
String
,
String
>
hello
()
{
this
.
gauges
.
submit
(
"timer.test.value"
,
Math
.
random
()
*
1000
+
1000
);
this
.
gauges
.
submit
(
"timer.test.value"
,
Math
.
random
()
*
1000
+
1000
);
return
Collections
.
singletonMap
(
"message"
,
"Hello "
+
return
Collections
.
singletonMap
(
"message"
,
this
.
helloWorldProperties
.
getName
());
"Hello "
+
this
.
helloWorldProperties
.
getName
());
}
}
}
}
spring-boot-samples/spring-boot-sample-metrics-opentsdb/pom.xml
View file @
273beaa3
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<main.basedir>
${basedir}/../..
</main.basedir>
<main.basedir>
${basedir}/../..
</main.basedir>
</properties>
</properties>
<dependencies>
<dependencies>
<!-- Compile -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
...
@@ -27,13 +28,13 @@
...
@@ -27,13 +28,13 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependency>
<!-- Optional -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
<optional>
true
</optional>
</dependency>
</dependency>
<!-- Test -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
...
...
spring-boot-samples/spring-boot-sample-metrics-redis/pom.xml
View file @
273beaa3
<?xml version="1.0" encoding="UTF-8"?>
<?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"
>
<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"
>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<parent>
<!-- Your own application should inherit from spring-boot-starter-parent -->
<!-- Your own application should inherit from spring-boot-starter-parent -->
...
@@ -19,6 +20,7 @@
...
@@ -19,6 +20,7 @@
<main.basedir>
${basedir}/../..
</main.basedir>
<main.basedir>
${basedir}/../..
</main.basedir>
</properties>
</properties>
<dependencies>
<dependencies>
<!-- Compile -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
...
@@ -31,13 +33,13 @@
...
@@ -31,13 +33,13 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
</dependency>
<!-- Optional -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
<optional>
true
</optional>
</dependency>
</dependency>
<!-- Test -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
...
...
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