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
8d92236e
Commit
8d92236e
authored
Aug 05, 2015
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
3ff878a9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
29 deletions
+27
-29
DataSourceHealthIndicator.java
...mework/boot/actuate/health/DataSourceHealthIndicator.java
+1
-0
ConfigurationPropertiesAutoConfiguration.java
...ure/context/ConfigurationPropertiesAutoConfiguration.java
+2
-1
H2ConsoleAutoConfiguration.java
...ork/boot/autoconfigure/h2/H2ConsoleAutoConfiguration.java
+6
-6
ServerProperties.java
...ingframework/boot/autoconfigure/web/ServerProperties.java
+9
-13
H2ConsoleAutoConfigurationIntegrationTests.java
...figure/h2/H2ConsoleAutoConfigurationIntegrationTests.java
+1
-0
H2ConsoleAutoConfigurationTests.java
...oot/autoconfigure/h2/H2ConsoleAutoConfigurationTests.java
+1
-0
ColorConverter.java
...g/springframework/boot/logging/log4j2/ColorConverter.java
+3
-5
Log4J2LoggingSystemTests.java
...amework/boot/logging/log4j2/Log4J2LoggingSystemTests.java
+2
-2
LogbackLoggingSystemTests.java
...ework/boot/logging/logback/LogbackLoggingSystemTests.java
+2
-2
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/DataSourceHealthIndicator.java
View file @
8d92236e
...
...
@@ -213,6 +213,7 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator implement
return
super
.
matchesProduct
(
product
)
||
product
.
toLowerCase
().
startsWith
(
"firebird"
);
}
};
private
final
String
product
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/ConfigurationPropertiesAutoConfiguration.java
View file @
8d92236e
...
...
@@ -23,7 +23,8 @@ import org.springframework.context.annotation.Configuration;
/**
* {@link EnableAutoConfiguration Auto-configuration} for {@link ConfigurationProperties}
* beans. Automatically binds and validates any bean annotated with {@code @ConfigurationProperties}.
* beans. Automatically binds and validates any bean annotated with
* {@code @ConfigurationProperties}.
*
* @author Stephane Nicoll
* @since 1.3.0
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfiguration.java
View file @
8d92236e
...
...
@@ -55,9 +55,9 @@ public class H2ConsoleAutoConfiguration {
@Bean
public
ServletRegistrationBean
h2Console
()
{
return
new
ServletRegistrationBean
(
new
WebServlet
(),
this
.
properties
.
getPath
()
.
endsWith
(
"/"
)
?
this
.
properties
.
getPath
()
+
"*"
:
this
.
properties
.
getPath
()
+
"/*"
);
String
path
=
this
.
properties
.
getPath
();
String
urlMapping
=
(
path
.
endsWith
(
"/"
)
?
path
+
"*"
:
path
+
"/*"
);
return
new
ServletRegistrationBean
(
new
WebServlet
(),
urlMapping
);
}
@Configuration
...
...
@@ -83,9 +83,9 @@ public class H2ConsoleAutoConfiguration {
@Override
public
void
configure
(
HttpSecurity
http
)
throws
Exception
{
HttpSecurity
h2Console
=
http
.
antMatcher
(
this
.
console
.
getPath
().
endsWith
(
"/"
)
?
this
.
console
.
getPath
()
+
"**"
:
this
.
console
.
getPath
()
+
"/**"
);
String
path
=
this
.
console
.
getPath
();
String
antPattern
=
(
path
.
endsWith
(
"/"
)
?
path
+
"**"
:
path
+
"/**"
);
HttpSecurity
h2Console
=
http
.
antMatcher
(
antPattern
);
h2Console
.
csrf
().
disable
();
h2Console
.
httpBasic
();
h2Console
.
headers
().
frameOptions
().
sameOrigin
();
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
View file @
8d92236e
...
...
@@ -777,7 +777,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
public
boolean
isEnabled
()
{
return
enabled
;
return
this
.
enabled
;
}
public
void
setEnabled
(
boolean
enabled
)
{
...
...
@@ -785,7 +785,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
public
String
getPattern
()
{
return
pattern
;
return
this
.
pattern
;
}
public
void
setPattern
(
String
pattern
)
{
...
...
@@ -793,7 +793,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
public
String
getDirectory
()
{
return
directory
;
return
this
.
directory
;
}
public
void
setDirectory
(
String
directory
)
{
...
...
@@ -801,7 +801,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
public
String
getPrefix
()
{
return
prefix
;
return
this
.
prefix
;
}
public
void
setPrefix
(
String
prefix
)
{
...
...
@@ -809,7 +809,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
public
String
getSuffix
()
{
return
suffix
;
return
this
.
suffix
;
}
public
void
setSuffix
(
String
suffix
)
{
...
...
@@ -888,11 +888,8 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
this
.
directBuffers
=
directBuffers
;
}
/**
* Access log configuration.
*/
public
Accesslog
getAccesslog
()
{
return
accesslog
;
return
this
.
accesslog
;
}
/**
...
...
@@ -969,7 +966,6 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
factory
.
setAccessLogEnabled
(
this
.
accesslog
.
enabled
);
}
public
static
class
Accesslog
{
/**
...
...
@@ -988,7 +984,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
private
File
dir
=
new
File
(
"logs"
);
public
boolean
isEnabled
()
{
return
enabled
;
return
this
.
enabled
;
}
public
void
setEnabled
(
boolean
enabled
)
{
...
...
@@ -996,7 +992,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
public
String
getPattern
()
{
return
pattern
;
return
this
.
pattern
;
}
public
void
setPattern
(
String
pattern
)
{
...
...
@@ -1004,7 +1000,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
public
File
getDir
()
{
return
dir
;
return
this
.
dir
;
}
public
void
setDir
(
File
dir
)
{
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfigurationIntegrationTests.java
View file @
8d92236e
...
...
@@ -88,6 +88,7 @@ public class H2ConsoleAutoConfigurationIntegrationTests {
public
void
mockConsole
()
{
}
}
}
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfigurationTests.java
View file @
8d92236e
...
...
@@ -109,4 +109,5 @@ public class H2ConsoleAutoConfigurationTests {
assertThat
(
this
.
context
.
getBean
(
ServletRegistrationBean
.
class
).
getUrlMappings
(),
hasItems
(
"/custom/*"
));
}
}
spring-boot/src/main/java/org/springframework/boot/logging/log4j2/ColorConverter.java
View file @
8d92236e
...
...
@@ -89,9 +89,8 @@ public class ColorConverter extends LogEventPatternConverter {
*/
public
static
ColorConverter
newInstance
(
Configuration
config
,
String
[]
options
)
{
if
(
options
.
length
<
1
)
{
LOGGER
.
error
(
"Incorrect number of options on style. Expected at least 1, received {}"
,
options
.
length
);
LOGGER
.
error
(
"Incorrect number of options on style. "
+
"Expected at least 1, received {}"
,
options
.
length
);
return
null
;
}
if
(
options
[
0
]
==
null
)
{
...
...
@@ -100,8 +99,7 @@ public class ColorConverter extends LogEventPatternConverter {
}
PatternParser
parser
=
PatternLayout
.
createPatternParser
(
config
);
List
<
PatternFormatter
>
formatters
=
parser
.
parse
(
options
[
0
]);
AnsiElement
element
=
options
.
length
==
1
?
null
:
ELEMENTS
.
get
(
options
[
1
]);
AnsiElement
element
=
(
options
.
length
==
1
?
null
:
ELEMENTS
.
get
(
options
[
1
]));
return
new
ColorConverter
(
formatters
,
element
);
}
...
...
spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java
View file @
8d92236e
...
...
@@ -200,8 +200,8 @@ public class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
this
.
loggingSystem
.
beforeInitialize
();
this
.
logger
.
info
(
"Hidden"
);
this
.
loggingSystem
.
initialize
(
null
,
null
,
null
);
this
.
output
.
expect
(
containsString
(
"Wrapped by:
java.lang.RuntimeException: Expected"
));
this
.
output
.
expect
(
containsString
(
"Wrapped by: "
+
"
java.lang.RuntimeException: Expected"
));
this
.
logger
.
warn
(
"Expected exception"
,
new
RuntimeException
(
"Expected"
,
new
RuntimeException
(
"Cause"
)));
}
...
...
spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java
View file @
8d92236e
...
...
@@ -252,8 +252,8 @@ public class LogbackLoggingSystemTests extends AbstractLoggingSystemTests {
this
.
loggingSystem
.
beforeInitialize
();
this
.
logger
.
info
(
"Hidden"
);
this
.
loggingSystem
.
initialize
(
this
.
initializationContext
,
null
,
null
);
this
.
output
.
expect
(
containsString
(
"Wrapped by:
java.lang.RuntimeException: Expected"
));
this
.
output
.
expect
(
containsString
(
"Wrapped by: "
+
"
java.lang.RuntimeException: Expected"
));
this
.
logger
.
warn
(
"Expected exception"
,
new
RuntimeException
(
"Expected"
,
new
RuntimeException
(
"Cause"
)));
}
...
...
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