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
a0c8d1f5
Commit
a0c8d1f5
authored
Apr 11, 2016
by
Johnny Lim
Committed by
Phillip Webb
Apr 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
cc140b2c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
InfoContributorAutoConfigurationTests.java
.../autoconfigure/InfoContributorAutoConfigurationTests.java
+5
-5
appendix-application-properties.adoc
...cs/src/main/asciidoc/appendix-application-properties.adoc
+1
-1
ImageBanner.java
...t/src/main/java/org/springframework/boot/ImageBanner.java
+4
-4
ImageBannerTests.java
.../test/java/org/springframework/boot/ImageBannerTests.java
+1
-1
SpringApplicationTests.java
...java/org/springframework/boot/SpringApplicationTests.java
+1
-1
No files found.
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/InfoContributorAutoConfigurationTests.java
View file @
a0c8d1f5
...
@@ -124,8 +124,8 @@ public class InfoContributorAutoConfigurationTests {
...
@@ -124,8 +124,8 @@ public class InfoContributorAutoConfigurationTests {
this
.
context
.
getBean
(
"buildInfoContributor"
,
InfoContributor
.
class
));
this
.
context
.
getBean
(
"buildInfoContributor"
,
InfoContributor
.
class
));
Object
build
=
content
.
get
(
"build"
);
Object
build
=
content
.
get
(
"build"
);
assertThat
(
build
).
isInstanceOf
(
Map
.
class
);
assertThat
(
build
).
isInstanceOf
(
Map
.
class
);
Map
<
String
,
Object
>
git
Info
=
(
Map
<
String
,
Object
>)
build
;
Map
<
String
,
Object
>
build
Info
=
(
Map
<
String
,
Object
>)
build
;
assertThat
(
git
Info
).
containsOnlyKeys
(
"group"
,
"artifact"
);
assertThat
(
build
Info
).
containsOnlyKeys
(
"group"
,
"artifact"
);
}
}
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
...
@@ -136,9 +136,9 @@ public class InfoContributorAutoConfigurationTests {
...
@@ -136,9 +136,9 @@ public class InfoContributorAutoConfigurationTests {
this
.
context
.
getBean
(
"buildInfoContributor"
,
InfoContributor
.
class
));
this
.
context
.
getBean
(
"buildInfoContributor"
,
InfoContributor
.
class
));
Object
build
=
content
.
get
(
"build"
);
Object
build
=
content
.
get
(
"build"
);
assertThat
(
build
).
isInstanceOf
(
Map
.
class
);
assertThat
(
build
).
isInstanceOf
(
Map
.
class
);
Map
<
String
,
Object
>
git
Info
=
(
Map
<
String
,
Object
>)
build
;
Map
<
String
,
Object
>
build
Info
=
(
Map
<
String
,
Object
>)
build
;
assertThat
(
git
Info
).
containsOnlyKeys
(
"group"
,
"artifact"
,
"foo"
);
assertThat
(
build
Info
).
containsOnlyKeys
(
"group"
,
"artifact"
,
"foo"
);
assertThat
(
git
Info
.
get
(
"foo"
)).
isEqualTo
(
"bar"
);
assertThat
(
build
Info
.
get
(
"foo"
)).
isEqualTo
(
"bar"
);
}
}
@Test
@Test
...
...
spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
View file @
a0c8d1f5
...
@@ -977,7 +977,7 @@ content into your application; rather pick only the properties that you need.
...
@@ -977,7 +977,7 @@ content into your application; rather pick only the properties that you need.
management.health.solr.enabled=true # Enable Solr health check.
management.health.solr.enabled=true # Enable Solr health check.
management.health.status.order=DOWN, OUT_OF_SERVICE, UNKNOWN, UP # Comma-separated list of health statuses in order of severity.
management.health.status.order=DOWN, OUT_OF_SERVICE, UNKNOWN, UP # Comma-separated list of health statuses in order of severity.
# INFO CONTRIBUTORS
# INFO CONTRIBUTORS
({sc-spring-boot-actuator}/autoconfigure/InfoContributorProperties.{sc-ext}[InfoContributorProperties])
management.info.build.enabled=true # Enable build info.
management.info.build.enabled=true # Enable build info.
management.info.build.mode=simple # Mode to use to expose build information.
management.info.build.mode=simple # Mode to use to expose build information.
management.info.defaults.enabled=true # Enable default info contributors.
management.info.defaults.enabled=true # Enable default info contributors.
...
...
spring-boot/src/main/java/org/springframework/boot/ImageBanner.java
View file @
a0c8d1f5
...
@@ -94,18 +94,18 @@ public class ImageBanner implements Banner {
...
@@ -94,18 +94,18 @@ public class ImageBanner implements Banner {
PropertyResolver
properties
=
new
RelaxedPropertyResolver
(
environment
,
PropertyResolver
properties
=
new
RelaxedPropertyResolver
(
environment
,
"banner.image."
);
"banner.image."
);
int
width
=
properties
.
getProperty
(
"width"
,
Integer
.
class
,
76
);
int
width
=
properties
.
getProperty
(
"width"
,
Integer
.
class
,
76
);
int
heig
th
=
properties
.
getProperty
(
"height"
,
Integer
.
class
,
0
);
int
heig
ht
=
properties
.
getProperty
(
"height"
,
Integer
.
class
,
0
);
int
margin
=
properties
.
getProperty
(
"margin"
,
Integer
.
class
,
2
);
int
margin
=
properties
.
getProperty
(
"margin"
,
Integer
.
class
,
2
);
boolean
invert
=
properties
.
getProperty
(
"invert"
,
Boolean
.
class
,
false
);
boolean
invert
=
properties
.
getProperty
(
"invert"
,
Boolean
.
class
,
false
);
BufferedImage
image
=
readImage
(
width
,
heig
th
);
BufferedImage
image
=
readImage
(
width
,
heig
ht
);
printBanner
(
image
,
margin
,
invert
,
out
);
printBanner
(
image
,
margin
,
invert
,
out
);
}
}
private
BufferedImage
readImage
(
int
width
,
int
heig
th
)
throws
IOException
{
private
BufferedImage
readImage
(
int
width
,
int
heig
ht
)
throws
IOException
{
InputStream
inputStream
=
this
.
image
.
getInputStream
();
InputStream
inputStream
=
this
.
image
.
getInputStream
();
try
{
try
{
BufferedImage
image
=
ImageIO
.
read
(
inputStream
);
BufferedImage
image
=
ImageIO
.
read
(
inputStream
);
return
resizeImage
(
image
,
width
,
heig
th
);
return
resizeImage
(
image
,
width
,
heig
ht
);
}
}
finally
{
finally
{
inputStream
.
close
();
inputStream
.
close
();
...
...
spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java
View file @
a0c8d1f5
...
@@ -157,7 +157,7 @@ public class ImageBannerTests {
...
@@ -157,7 +157,7 @@ public class ImageBannerTests {
}
}
@Test
@Test
public
void
printBannerWhenHasMarginPropertShouldPrintSizedMargin
()
throws
Exception
{
public
void
printBannerWhenHasMarginPropert
y
ShouldPrintSizedMargin
()
throws
Exception
{
AnsiOutput
.
setEnabled
(
AnsiOutput
.
Enabled
.
NEVER
);
AnsiOutput
.
setEnabled
(
AnsiOutput
.
Enabled
.
NEVER
);
String
banner
=
printBanner
(
"large.gif"
,
"banner.image.margin=4"
);
String
banner
=
printBanner
(
"large.gif"
,
"banner.image.margin=4"
);
String
[]
lines
=
banner
.
split
(
NEW_LINE
);
String
[]
lines
=
banner
.
split
(
NEW_LINE
);
...
...
spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java
View file @
a0c8d1f5
...
@@ -1129,7 +1129,7 @@ public class SpringApplicationTests {
...
@@ -1129,7 +1129,7 @@ public class SpringApplicationTests {
@Override
@Override
public
Resource
getResource
(
String
path
)
{
public
Resource
getResource
(
String
path
)
{
Resource
resource
=
this
.
resources
.
get
(
path
);
Resource
resource
=
this
.
resources
.
get
(
path
);
return
(
resource
==
null
?
new
ClassPathResource
(
"doesnotexit"
)
:
resource
);
return
(
resource
==
null
?
new
ClassPathResource
(
"doesnotexi
s
t"
)
:
resource
);
}
}
@Override
@Override
...
...
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