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
7163fe1f
Commit
7163fe1f
authored
Oct 01, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14621 from izeye
* pr/14621: Polish
parents
da1fde6a
1eca492c
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
41 additions
and
47 deletions
+41
-47
WebFluxTags.java
...boot/actuate/metrics/web/reactive/server/WebFluxTags.java
+7
-5
WebMvcTags.java
...ramework/boot/actuate/metrics/web/servlet/WebMvcTags.java
+8
-6
EmbeddedDataSourceConfiguration.java
...t/autoconfigure/jdbc/EmbeddedDataSourceConfiguration.java
+2
-3
ConditionEvaluationReportLoggingListener.java
...ure/logging/ConditionEvaluationReportLoggingListener.java
+3
-4
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+5
-5
AutoConfigureTestDatabaseWithMultipleDatasourcesIntegrationTests.java
...eTestDatabaseWithMultipleDatasourcesIntegrationTests.java
+4
-6
ExampleJdbcApplication.java
.../boot/test/autoconfigure/jdbc/ExampleJdbcApplication.java
+2
-3
JdbcTestWithAutoConfigureTestDatabaseReplaceExplicitIntegrationTests.java
...ConfigureTestDatabaseReplaceExplicitIntegrationTests.java
+2
-3
JdbcTestWithAutoConfigureTestDatabaseReplacePropertyAnyIntegrationTests.java
...figureTestDatabaseReplacePropertyAnyIntegrationTests.java
+2
-3
TestDatabaseAutoConfigurationTests.java
...utoconfigure/jdbc/TestDatabaseAutoConfigurationTests.java
+2
-3
ExampleJooqApplication.java
.../boot/test/autoconfigure/jooq/ExampleJooqApplication.java
+2
-3
ExampleDataJpaApplication.java
...test/autoconfigure/orm/jpa/ExampleDataJpaApplication.java
+2
-3
No files found.
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTags.java
View file @
7163fe1f
...
...
@@ -84,11 +84,13 @@ public final class WebFluxTags {
return
Tag
.
of
(
"uri"
,
pathPattern
.
getPatternString
());
}
HttpStatus
status
=
exchange
.
getResponse
().
getStatusCode
();
if
(
status
!=
null
&&
status
.
is3xxRedirection
())
{
return
URI_REDIRECTION
;
}
if
(
status
!=
null
&&
status
.
equals
(
HttpStatus
.
NOT_FOUND
))
{
return
URI_NOT_FOUND
;
if
(
status
!=
null
)
{
if
(
status
.
is3xxRedirection
())
{
return
URI_REDIRECTION
;
}
if
(
status
==
HttpStatus
.
NOT_FOUND
)
{
return
URI_NOT_FOUND
;
}
}
String
path
=
exchange
.
getRequest
().
getPath
().
value
();
if
(
path
.
isEmpty
())
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcTags.java
View file @
7163fe1f
...
...
@@ -90,13 +90,15 @@ public final class WebMvcTags {
if
(
pattern
!=
null
)
{
return
Tag
.
of
(
"uri"
,
pattern
);
}
else
if
(
response
!=
null
)
{
if
(
response
!=
null
)
{
HttpStatus
status
=
extractStatus
(
response
);
if
(
status
!=
null
&&
status
.
is3xxRedirection
())
{
return
URI_REDIRECTION
;
}
if
(
status
!=
null
&&
status
.
equals
(
HttpStatus
.
NOT_FOUND
))
{
return
URI_NOT_FOUND
;
if
(
status
!=
null
)
{
if
(
status
.
is3xxRedirection
())
{
return
URI_REDIRECTION
;
}
if
(
status
==
HttpStatus
.
NOT_FOUND
)
{
return
URI_NOT_FOUND
;
}
}
}
String
pathInfo
=
getPathInfo
(
request
);
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/EmbeddedDataSourceConfiguration.java
View file @
7163fe1f
...
...
@@ -54,10 +54,9 @@ public class EmbeddedDataSourceConfiguration implements BeanClassLoaderAware {
@Bean
public
EmbeddedDatabase
dataSource
()
{
EmbeddedDatabaseBuilder
builder
=
new
EmbeddedDatabaseBuilder
()
this
.
database
=
new
EmbeddedDatabaseBuilder
()
.
setType
(
EmbeddedDatabaseConnection
.
get
(
this
.
classLoader
).
getType
())
.
setName
(
this
.
properties
.
determineDatabaseName
());
this
.
database
=
builder
.
build
();
.
setName
(
this
.
properties
.
determineDatabaseName
()).
build
();
return
this
.
database
;
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java
View file @
7163fe1f
...
...
@@ -128,13 +128,12 @@ public class ConditionEvaluationReportLoggingListener
}
}
else
{
if
(
isCrashReport
&&
this
.
logger
.
isInfoEnabled
()
&&
!
this
.
logger
.
isDebugEnabled
())
{
logMessage
(
"debug"
);
}
if
(
this
.
logger
.
isDebugEnabled
())
{
this
.
logger
.
debug
(
new
ConditionEvaluationReportMessage
(
this
.
report
));
}
else
if
(
isCrashReport
)
{
logMessage
(
"debug"
);
}
}
}
}
...
...
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
7163fe1f
...
...
@@ -7665,11 +7665,11 @@ to print the report in auto-configuration tests.
@Test
public void autoConfigTest {
ConditionEvaluationReportLoggingListener initializer = new ConditionEvaluationReportLoggingListener(
LogLevel.INFO);
ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withInitializer(initializer).run((context
-> {
// Do something...
})
);
LogLevel.INFO);
ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withInitializer(initializer).run((context)
-> {
// Do something...
}
);
}
----
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/AutoConfigureTestDatabaseWithMultipleDatasourcesIntegrationTests.java
View file @
7163fe1f
...
...
@@ -61,16 +61,14 @@ public class AutoConfigureTestDatabaseWithMultipleDatasourcesIntegrationTests {
@Bean
@Primary
public
DataSource
dataSource
()
{
EmbeddedDatabaseBuilder
builder
=
new
EmbeddedDatabaseBuilder
()
.
generateUniqueName
(
true
).
setType
(
EmbeddedDatabaseType
.
HSQL
);
return
builder
.
build
();
return
new
EmbeddedDatabaseBuilder
().
generateUniqueName
(
true
)
.
setType
(
EmbeddedDatabaseType
.
HSQL
).
build
();
}
@Bean
public
DataSource
secondaryDataSource
()
{
EmbeddedDatabaseBuilder
builder
=
new
EmbeddedDatabaseBuilder
()
.
generateUniqueName
(
true
).
setType
(
EmbeddedDatabaseType
.
HSQL
);
return
builder
.
build
();
return
new
EmbeddedDatabaseBuilder
().
generateUniqueName
(
true
)
.
setType
(
EmbeddedDatabaseType
.
HSQL
).
build
();
}
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/ExampleJdbcApplication.java
View file @
7163fe1f
...
...
@@ -33,9 +33,8 @@ public class ExampleJdbcApplication {
@Bean
public
DataSource
dataSource
()
{
EmbeddedDatabaseBuilder
builder
=
new
EmbeddedDatabaseBuilder
()
.
generateUniqueName
(
true
).
setType
(
EmbeddedDatabaseType
.
HSQL
);
return
builder
.
build
();
return
new
EmbeddedDatabaseBuilder
().
generateUniqueName
(
true
)
.
setType
(
EmbeddedDatabaseType
.
HSQL
).
build
();
}
}
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTestWithAutoConfigureTestDatabaseReplaceExplicitIntegrationTests.java
View file @
7163fe1f
...
...
@@ -60,9 +60,8 @@ public class JdbcTestWithAutoConfigureTestDatabaseReplaceExplicitIntegrationTest
@Bean
public
DataSource
dataSource
()
{
EmbeddedDatabaseBuilder
builder
=
new
EmbeddedDatabaseBuilder
()
.
generateUniqueName
(
true
).
setType
(
EmbeddedDatabaseType
.
H2
);
return
builder
.
build
();
return
new
EmbeddedDatabaseBuilder
().
generateUniqueName
(
true
)
.
setType
(
EmbeddedDatabaseType
.
H2
).
build
();
}
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTestWithAutoConfigureTestDatabaseReplacePropertyAnyIntegrationTests.java
View file @
7163fe1f
...
...
@@ -62,9 +62,8 @@ public class JdbcTestWithAutoConfigureTestDatabaseReplacePropertyAnyIntegrationT
@Bean
public
DataSource
dataSource
()
{
EmbeddedDatabaseBuilder
builder
=
new
EmbeddedDatabaseBuilder
()
.
generateUniqueName
(
true
).
setType
(
EmbeddedDatabaseType
.
H2
);
return
builder
.
build
();
return
new
EmbeddedDatabaseBuilder
().
generateUniqueName
(
true
)
.
setType
(
EmbeddedDatabaseType
.
H2
).
build
();
}
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/TestDatabaseAutoConfigurationTests.java
View file @
7163fe1f
...
...
@@ -73,9 +73,8 @@ public class TestDatabaseAutoConfigurationTests {
@Bean
public
DataSource
dataSource
()
{
EmbeddedDatabaseBuilder
builder
=
new
EmbeddedDatabaseBuilder
()
.
generateUniqueName
(
true
).
setType
(
EmbeddedDatabaseType
.
HSQL
);
return
builder
.
build
();
return
new
EmbeddedDatabaseBuilder
().
generateUniqueName
(
true
)
.
setType
(
EmbeddedDatabaseType
.
HSQL
).
build
();
}
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jooq/ExampleJooqApplication.java
View file @
7163fe1f
...
...
@@ -33,9 +33,8 @@ public class ExampleJooqApplication {
@Bean
public
DataSource
dataSource
()
{
EmbeddedDatabaseBuilder
builder
=
new
EmbeddedDatabaseBuilder
()
.
generateUniqueName
(
true
).
setType
(
EmbeddedDatabaseType
.
HSQL
);
return
builder
.
build
();
return
new
EmbeddedDatabaseBuilder
().
generateUniqueName
(
true
)
.
setType
(
EmbeddedDatabaseType
.
HSQL
).
build
();
}
}
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/ExampleDataJpaApplication.java
View file @
7163fe1f
...
...
@@ -33,9 +33,8 @@ public class ExampleDataJpaApplication {
@Bean
public
DataSource
dataSource
()
{
EmbeddedDatabaseBuilder
builder
=
new
EmbeddedDatabaseBuilder
()
.
generateUniqueName
(
true
).
setType
(
EmbeddedDatabaseType
.
HSQL
);
return
builder
.
build
();
return
new
EmbeddedDatabaseBuilder
().
generateUniqueName
(
true
)
.
setType
(
EmbeddedDatabaseType
.
HSQL
).
build
();
}
}
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