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
ea55ca99
Commit
ea55ca99
authored
Apr 09, 2021
by
dreis2211
Committed by
Stephane Nicoll
Apr 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused method parameters
See gh-25986
parent
f6afe417
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
44 deletions
+33
-44
AsciidoctorConventions.java
...rg/springframework/boot/build/AsciidoctorConventions.java
+2
-2
MavenPublishingConventions.java
...pringframework/boot/build/MavenPublishingConventions.java
+6
-6
DataSourceInitializationConfiguration.java
...configure/jdbc/DataSourceInitializationConfiguration.java
+6
-8
ConfigDataEnvironmentContributors.java
...oot/context/config/ConfigDataEnvironmentContributors.java
+2
-3
ConfigDataProperties.java
...ngframework/boot/context/config/ConfigDataProperties.java
+0
-5
ConfigTreeConfigDataLocationResolver.java
.../context/config/ConfigTreeConfigDataLocationResolver.java
+3
-4
ConfigurationPropertyName.java
.../context/properties/source/ConfigurationPropertyName.java
+4
-4
EnvironmentPostProcessorApplicationListener.java
...boot/env/EnvironmentPostProcessorApplicationListener.java
+5
-5
DefaultLogbackConfiguration.java
...ork/boot/logging/logback/DefaultLogbackConfiguration.java
+4
-6
LogbackLoggingSystem.java
...gframework/boot/logging/logback/LogbackLoggingSystem.java
+1
-1
No files found.
buildSrc/src/main/java/org/springframework/boot/build/AsciidoctorConventions.java
View file @
ea55ca99
...
@@ -110,7 +110,7 @@ class AsciidoctorConventions {
...
@@ -110,7 +110,7 @@ class AsciidoctorConventions {
asciidoctorTask
.
baseDirFollowsSourceDir
();
asciidoctorTask
.
baseDirFollowsSourceDir
();
createSyncDocumentationSourceTask
(
project
,
asciidoctorTask
);
createSyncDocumentationSourceTask
(
project
,
asciidoctorTask
);
if
(
asciidoctorTask
instanceof
AsciidoctorTask
)
{
if
(
asciidoctorTask
instanceof
AsciidoctorTask
)
{
configureAsciidoctorHtmlTask
(
project
,
(
AsciidoctorTask
)
asciidoctorTask
);
configureAsciidoctorHtmlTask
((
AsciidoctorTask
)
asciidoctorTask
);
}
}
}
}
...
@@ -144,7 +144,7 @@ class AsciidoctorConventions {
...
@@ -144,7 +144,7 @@ class AsciidoctorConventions {
return
syncDocumentationSource
;
return
syncDocumentationSource
;
}
}
private
void
configureAsciidoctorHtmlTask
(
Project
project
,
AsciidoctorTask
asciidoctorTask
)
{
private
void
configureAsciidoctorHtmlTask
(
AsciidoctorTask
asciidoctorTask
)
{
asciidoctorTask
.
outputOptions
((
outputOptions
)
->
outputOptions
.
backends
(
"spring-html"
));
asciidoctorTask
.
outputOptions
((
outputOptions
)
->
outputOptions
.
backends
(
"spring-html"
));
}
}
...
...
buildSrc/src/main/java/org/springframework/boot/build/MavenPublishingConventions.java
View file @
ea55ca99
/*
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
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.
...
@@ -22,6 +22,7 @@ import org.gradle.api.attributes.Usage;
...
@@ -22,6 +22,7 @@ import org.gradle.api.attributes.Usage;
import
org.gradle.api.plugins.JavaPlugin
;
import
org.gradle.api.plugins.JavaPlugin
;
import
org.gradle.api.plugins.JavaPluginExtension
;
import
org.gradle.api.plugins.JavaPluginExtension
;
import
org.gradle.api.publish.PublishingExtension
;
import
org.gradle.api.publish.PublishingExtension
;
import
org.gradle.api.publish.VariantVersionMappingStrategy
;
import
org.gradle.api.publish.maven.MavenPom
;
import
org.gradle.api.publish.maven.MavenPom
;
import
org.gradle.api.publish.maven.MavenPomDeveloperSpec
;
import
org.gradle.api.publish.maven.MavenPomDeveloperSpec
;
import
org.gradle.api.publish.maven.MavenPomIssueManagement
;
import
org.gradle.api.publish.maven.MavenPomIssueManagement
;
...
@@ -78,8 +79,7 @@ class MavenPublishingConventions {
...
@@ -78,8 +79,7 @@ class MavenPublishingConventions {
private
void
customizeMavenPublication
(
MavenPublication
publication
,
Project
project
)
{
private
void
customizeMavenPublication
(
MavenPublication
publication
,
Project
project
)
{
customizePom
(
publication
.
getPom
(),
project
);
customizePom
(
publication
.
getPom
(),
project
);
project
.
getPlugins
().
withType
(
JavaPlugin
.
class
)
project
.
getPlugins
().
withType
(
JavaPlugin
.
class
).
all
((
javaPlugin
)
->
customizeJavaMavenPublication
(
publication
));
.
all
((
javaPlugin
)
->
customizeJavaMavenPublication
(
publication
,
project
));
}
}
private
void
customizePom
(
MavenPom
pom
,
Project
project
)
{
private
void
customizePom
(
MavenPom
pom
,
Project
project
)
{
...
@@ -97,11 +97,11 @@ class MavenPublishingConventions {
...
@@ -97,11 +97,11 @@ class MavenPublishingConventions {
}
}
}
}
private
void
customizeJavaMavenPublication
(
MavenPublication
publication
,
Project
project
)
{
private
void
customizeJavaMavenPublication
(
MavenPublication
publication
)
{
publication
.
versionMapping
((
strategy
)
->
strategy
.
usage
(
Usage
.
JAVA_API
,
(
mappingStrategy
)
->
mappingStrategy
publication
.
versionMapping
((
strategy
)
->
strategy
.
usage
(
Usage
.
JAVA_API
,
(
mappingStrategy
)
->
mappingStrategy
.
fromResolutionOf
(
JavaPlugin
.
RUNTIME_CLASSPATH_CONFIGURATION_NAME
)));
.
fromResolutionOf
(
JavaPlugin
.
RUNTIME_CLASSPATH_CONFIGURATION_NAME
)));
publication
.
versionMapping
(
(
strategy
)
->
strategy
.
usage
(
Usage
.
JAVA_RUNTIME
,
publication
.
versionMapping
(
(
mappingStrategy
)
->
mappingStrategy
.
fromResolutionResult
()
));
(
strategy
)
->
strategy
.
usage
(
Usage
.
JAVA_RUNTIME
,
VariantVersionMappingStrategy:
:
fromResolutionResult
));
}
}
private
void
customizeOrganization
(
MavenPomOrganization
organization
)
{
private
void
customizeOrganization
(
MavenPomOrganization
organization
)
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceInitializationConfiguration.java
View file @
ea55ca99
...
@@ -49,7 +49,6 @@ import org.springframework.context.annotation.ConditionContext;
...
@@ -49,7 +49,6 @@ import org.springframework.context.annotation.ConditionContext;
import
org.springframework.context.annotation.DependsOn
;
import
org.springframework.context.annotation.DependsOn
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.core.type.AnnotatedTypeMetadata
;
import
org.springframework.core.type.AnnotatedTypeMetadata
;
import
org.springframework.jdbc.datasource.SimpleDriverDataSource
;
import
org.springframework.jdbc.datasource.SimpleDriverDataSource
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
...
@@ -63,8 +62,7 @@ import org.springframework.util.StringUtils;
...
@@ -63,8 +62,7 @@ import org.springframework.util.StringUtils;
@Deprecated
@Deprecated
class
DataSourceInitializationConfiguration
{
class
DataSourceInitializationConfiguration
{
private
static
DataSource
determineDataSource
(
Supplier
<
DataSource
>
dataSource
,
String
username
,
String
password
,
private
static
DataSource
determineDataSource
(
Supplier
<
DataSource
>
dataSource
,
String
username
,
String
password
)
{
DataSourceProperties
properties
)
{
if
(
StringUtils
.
hasText
(
username
)
&&
StringUtils
.
hasText
(
password
))
{
if
(
StringUtils
.
hasText
(
username
)
&&
StringUtils
.
hasText
(
password
))
{
DataSourceBuilder
.
derivedFrom
(
dataSource
.
get
()).
type
(
SimpleDriverDataSource
.
class
).
username
(
username
)
DataSourceBuilder
.
derivedFrom
(
dataSource
.
get
()).
type
(
SimpleDriverDataSource
.
class
).
username
(
username
)
.
password
(
password
).
build
();
.
password
(
password
).
build
();
...
@@ -92,14 +90,14 @@ class DataSourceInitializationConfiguration {
...
@@ -92,14 +90,14 @@ class DataSourceInitializationConfiguration {
@Bean
@Bean
DataSourceScriptDatabaseInitializer
ddlOnlyScriptDataSourceInitializer
(
ObjectProvider
<
DataSource
>
dataSource
,
DataSourceScriptDatabaseInitializer
ddlOnlyScriptDataSourceInitializer
(
ObjectProvider
<
DataSource
>
dataSource
,
DataSourceProperties
properties
,
ResourceLoader
resourceLoader
)
{
DataSourceProperties
properties
)
{
DatabaseInitializationSettings
settings
=
new
DatabaseInitializationSettings
();
DatabaseInitializationSettings
settings
=
new
DatabaseInitializationSettings
();
settings
.
setSchemaLocations
(
scriptLocations
(
properties
.
getSchema
(),
"schema"
,
properties
.
getPlatform
()));
settings
.
setSchemaLocations
(
scriptLocations
(
properties
.
getSchema
(),
"schema"
,
properties
.
getPlatform
()));
settings
.
setContinueOnError
(
properties
.
isContinueOnError
());
settings
.
setContinueOnError
(
properties
.
isContinueOnError
());
settings
.
setSeparator
(
properties
.
getSeparator
());
settings
.
setSeparator
(
properties
.
getSeparator
());
settings
.
setEncoding
(
properties
.
getSqlScriptEncoding
());
settings
.
setEncoding
(
properties
.
getSqlScriptEncoding
());
DataSource
initializationDataSource
=
determineDataSource
(
dataSource:
:
getObject
,
DataSource
initializationDataSource
=
determineDataSource
(
dataSource:
:
getObject
,
properties
.
getSchemaUsername
(),
properties
.
getSchemaPassword
()
,
properties
);
properties
.
getSchemaUsername
(),
properties
.
getSchemaPassword
());
return
new
InitializationModeDataSourceScriptDatabaseInitializer
(
initializationDataSource
,
settings
,
return
new
InitializationModeDataSourceScriptDatabaseInitializer
(
initializationDataSource
,
settings
,
properties
.
getInitializationMode
());
properties
.
getInitializationMode
());
}
}
...
@@ -107,14 +105,14 @@ class DataSourceInitializationConfiguration {
...
@@ -107,14 +105,14 @@ class DataSourceInitializationConfiguration {
@Bean
@Bean
@DependsOn
(
"ddlOnlyScriptDataSourceInitializer"
)
@DependsOn
(
"ddlOnlyScriptDataSourceInitializer"
)
DataSourceScriptDatabaseInitializer
dmlOnlyScriptDataSourceInitializer
(
ObjectProvider
<
DataSource
>
dataSource
,
DataSourceScriptDatabaseInitializer
dmlOnlyScriptDataSourceInitializer
(
ObjectProvider
<
DataSource
>
dataSource
,
DataSourceProperties
properties
,
ResourceLoader
resourceLoader
)
{
DataSourceProperties
properties
)
{
DatabaseInitializationSettings
settings
=
new
DatabaseInitializationSettings
();
DatabaseInitializationSettings
settings
=
new
DatabaseInitializationSettings
();
settings
.
setDataLocations
(
scriptLocations
(
properties
.
getData
(),
"data"
,
properties
.
getPlatform
()));
settings
.
setDataLocations
(
scriptLocations
(
properties
.
getData
(),
"data"
,
properties
.
getPlatform
()));
settings
.
setContinueOnError
(
properties
.
isContinueOnError
());
settings
.
setContinueOnError
(
properties
.
isContinueOnError
());
settings
.
setSeparator
(
properties
.
getSeparator
());
settings
.
setSeparator
(
properties
.
getSeparator
());
settings
.
setEncoding
(
properties
.
getSqlScriptEncoding
());
settings
.
setEncoding
(
properties
.
getSqlScriptEncoding
());
DataSource
initializationDataSource
=
determineDataSource
(
dataSource:
:
getObject
,
DataSource
initializationDataSource
=
determineDataSource
(
dataSource:
:
getObject
,
properties
.
getDataUsername
(),
properties
.
getDataPassword
()
,
properties
);
properties
.
getDataUsername
(),
properties
.
getDataPassword
());
return
new
InitializationModeDataSourceScriptDatabaseInitializer
(
initializationDataSource
,
settings
,
return
new
InitializationModeDataSourceScriptDatabaseInitializer
(
initializationDataSource
,
settings
,
properties
.
getInitializationMode
());
properties
.
getInitializationMode
());
}
}
...
@@ -149,7 +147,7 @@ class DataSourceInitializationConfiguration {
...
@@ -149,7 +147,7 @@ class DataSourceInitializationConfiguration {
@Bean
@Bean
DataSourceScriptDatabaseInitializer
scriptDataSourceInitializer
(
DataSource
dataSource
,
DataSourceScriptDatabaseInitializer
scriptDataSourceInitializer
(
DataSource
dataSource
,
DataSourceProperties
properties
,
ResourceLoader
resourceLoader
)
{
DataSourceProperties
properties
)
{
DatabaseInitializationSettings
settings
=
new
DatabaseInitializationSettings
();
DatabaseInitializationSettings
settings
=
new
DatabaseInitializationSettings
();
settings
.
setSchemaLocations
(
scriptLocations
(
properties
.
getSchema
(),
"schema"
,
properties
.
getPlatform
()));
settings
.
setSchemaLocations
(
scriptLocations
(
properties
.
getSchema
(),
"schema"
,
properties
.
getPlatform
()));
settings
.
setDataLocations
(
scriptLocations
(
properties
.
getData
(),
"data"
,
properties
.
getPlatform
()));
settings
.
setDataLocations
(
scriptLocations
(
properties
.
getData
(),
"data"
,
properties
.
getPlatform
()));
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironmentContributors.java
View file @
ea55ca99
...
@@ -217,7 +217,7 @@ class ConfigDataEnvironmentContributors implements Iterable<ConfigDataEnvironmen
...
@@ -217,7 +217,7 @@ class ConfigDataEnvironmentContributors implements Iterable<ConfigDataEnvironmen
private
Binder
getBinder
(
ConfigDataActivationContext
activationContext
,
private
Binder
getBinder
(
ConfigDataActivationContext
activationContext
,
Predicate
<
ConfigDataEnvironmentContributor
>
filter
,
Set
<
BinderOption
>
options
)
{
Predicate
<
ConfigDataEnvironmentContributor
>
filter
,
Set
<
BinderOption
>
options
)
{
boolean
failOnInactiveSource
=
options
.
contains
(
BinderOption
.
FAIL_ON_BIND_TO_INACTIVE_SOURCE
);
boolean
failOnInactiveSource
=
options
.
contains
(
BinderOption
.
FAIL_ON_BIND_TO_INACTIVE_SOURCE
);
Iterable
<
ConfigurationPropertySource
>
sources
=
()
->
getBinderSources
(
activationContext
,
Iterable
<
ConfigurationPropertySource
>
sources
=
()
->
getBinderSources
(
filter
.
and
((
contributor
)
->
failOnInactiveSource
||
contributor
.
isActive
(
activationContext
)));
filter
.
and
((
contributor
)
->
failOnInactiveSource
||
contributor
.
isActive
(
activationContext
)));
PlaceholdersResolver
placeholdersResolver
=
new
ConfigDataEnvironmentContributorPlaceholdersResolver
(
this
.
root
,
PlaceholdersResolver
placeholdersResolver
=
new
ConfigDataEnvironmentContributorPlaceholdersResolver
(
this
.
root
,
activationContext
,
failOnInactiveSource
);
activationContext
,
failOnInactiveSource
);
...
@@ -225,8 +225,7 @@ class ConfigDataEnvironmentContributors implements Iterable<ConfigDataEnvironmen
...
@@ -225,8 +225,7 @@ class ConfigDataEnvironmentContributors implements Iterable<ConfigDataEnvironmen
return
new
Binder
(
sources
,
placeholdersResolver
,
null
,
null
,
bindHandler
);
return
new
Binder
(
sources
,
placeholdersResolver
,
null
,
null
,
bindHandler
);
}
}
private
Iterator
<
ConfigurationPropertySource
>
getBinderSources
(
ConfigDataActivationContext
activationContext
,
private
Iterator
<
ConfigurationPropertySource
>
getBinderSources
(
Predicate
<
ConfigDataEnvironmentContributor
>
filter
)
{
Predicate
<
ConfigDataEnvironmentContributor
>
filter
)
{
return
this
.
root
.
stream
().
filter
(
this
::
hasConfigurationPropertySource
).
filter
(
filter
)
return
this
.
root
.
stream
().
filter
(
this
::
hasConfigurationPropertySource
).
filter
(
filter
)
.
map
(
ConfigDataEnvironmentContributor:
:
getConfigurationPropertySource
).
iterator
();
.
map
(
ConfigDataEnvironmentContributor:
:
getConfigurationPropertySource
).
iterator
();
}
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataProperties.java
View file @
ea55ca99
...
@@ -57,11 +57,6 @@ class ConfigDataProperties {
...
@@ -57,11 +57,6 @@ class ConfigDataProperties {
* @param activate the activate properties
* @param activate the activate properties
*/
*/
ConfigDataProperties
(
@Name
(
"import"
)
List
<
ConfigDataLocation
>
imports
,
Activate
activate
)
{
ConfigDataProperties
(
@Name
(
"import"
)
List
<
ConfigDataLocation
>
imports
,
Activate
activate
)
{
this
(
imports
,
activate
,
Collections
.
emptyList
());
}
private
ConfigDataProperties
(
List
<
ConfigDataLocation
>
imports
,
Activate
activate
,
List
<
ConfigurationProperty
>
boundProperties
)
{
this
.
imports
=
(
imports
!=
null
)
?
imports
:
Collections
.
emptyList
();
this
.
imports
=
(
imports
!=
null
)
?
imports
:
Collections
.
emptyList
();
this
.
activate
=
activate
;
this
.
activate
=
activate
;
}
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigTreeConfigDataLocationResolver.java
View file @
ea55ca99
/*
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
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.
...
@@ -52,15 +52,14 @@ public class ConfigTreeConfigDataLocationResolver implements ConfigDataLocationR
...
@@ -52,15 +52,14 @@ public class ConfigTreeConfigDataLocationResolver implements ConfigDataLocationR
public
List
<
ConfigTreeConfigDataResource
>
resolve
(
ConfigDataLocationResolverContext
context
,
public
List
<
ConfigTreeConfigDataResource
>
resolve
(
ConfigDataLocationResolverContext
context
,
ConfigDataLocation
location
)
{
ConfigDataLocation
location
)
{
try
{
try
{
return
resolve
(
context
,
location
.
getNonPrefixedValue
(
PREFIX
));
return
resolve
(
location
.
getNonPrefixedValue
(
PREFIX
));
}
}
catch
(
IOException
ex
)
{
catch
(
IOException
ex
)
{
throw
new
ConfigDataLocationNotFoundException
(
location
,
ex
);
throw
new
ConfigDataLocationNotFoundException
(
location
,
ex
);
}
}
}
}
private
List
<
ConfigTreeConfigDataResource
>
resolve
(
ConfigDataLocationResolverContext
context
,
String
location
)
private
List
<
ConfigTreeConfigDataResource
>
resolve
(
String
location
)
throws
IOException
{
throws
IOException
{
Assert
.
isTrue
(
location
.
endsWith
(
"/"
),
Assert
.
isTrue
(
location
.
endsWith
(
"/"
),
()
->
String
.
format
(
"Config tree location '%s' must end with '/'"
,
location
));
()
->
String
.
format
(
"Config tree location '%s' must end with '/'"
,
location
));
if
(!
this
.
resourceLoader
.
isPattern
(
location
))
{
if
(!
this
.
resourceLoader
.
isPattern
(
location
))
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java
View file @
ea55ca99
...
@@ -753,7 +753,7 @@ public final class ConfigurationPropertyName implements Comparable<Configuration
...
@@ -753,7 +753,7 @@ public final class ConfigurationPropertyName implements Comparable<Configuration
ElementType
[]
type
=
new
ElementType
[
size
];
ElementType
[]
type
=
new
ElementType
[
size
];
System
.
arraycopy
(
this
.
type
,
0
,
type
,
0
,
this
.
size
);
System
.
arraycopy
(
this
.
type
,
0
,
type
,
0
,
this
.
size
);
System
.
arraycopy
(
additional
.
type
,
0
,
type
,
this
.
size
,
additional
.
size
);
System
.
arraycopy
(
additional
.
type
,
0
,
type
,
this
.
size
,
additional
.
size
);
CharSequence
[]
resolved
=
newResolved
(
0
,
size
);
CharSequence
[]
resolved
=
newResolved
(
size
);
for
(
int
i
=
0
;
i
<
additional
.
size
;
i
++)
{
for
(
int
i
=
0
;
i
<
additional
.
size
;
i
++)
{
resolved
[
this
.
size
+
i
]
=
additional
.
get
(
i
);
resolved
[
this
.
size
+
i
]
=
additional
.
get
(
i
);
}
}
...
@@ -761,13 +761,13 @@ public final class ConfigurationPropertyName implements Comparable<Configuration
...
@@ -761,13 +761,13 @@ public final class ConfigurationPropertyName implements Comparable<Configuration
}
}
Elements
chop
(
int
size
)
{
Elements
chop
(
int
size
)
{
CharSequence
[]
resolved
=
newResolved
(
0
,
size
);
CharSequence
[]
resolved
=
newResolved
(
size
);
return
new
Elements
(
this
.
source
,
size
,
this
.
start
,
this
.
end
,
this
.
type
,
resolved
);
return
new
Elements
(
this
.
source
,
size
,
this
.
start
,
this
.
end
,
this
.
type
,
resolved
);
}
}
Elements
subElements
(
int
offset
)
{
Elements
subElements
(
int
offset
)
{
int
size
=
this
.
size
-
offset
;
int
size
=
this
.
size
-
offset
;
CharSequence
[]
resolved
=
newResolved
(
offset
,
size
);
CharSequence
[]
resolved
=
newResolved
(
size
);
int
[]
start
=
new
int
[
size
];
int
[]
start
=
new
int
[
size
];
System
.
arraycopy
(
this
.
start
,
offset
,
start
,
0
,
size
);
System
.
arraycopy
(
this
.
start
,
offset
,
start
,
0
,
size
);
int
[]
end
=
new
int
[
size
];
int
[]
end
=
new
int
[
size
];
...
@@ -777,7 +777,7 @@ public final class ConfigurationPropertyName implements Comparable<Configuration
...
@@ -777,7 +777,7 @@ public final class ConfigurationPropertyName implements Comparable<Configuration
return
new
Elements
(
this
.
source
,
size
,
start
,
end
,
type
,
resolved
);
return
new
Elements
(
this
.
source
,
size
,
start
,
end
,
type
,
resolved
);
}
}
private
CharSequence
[]
newResolved
(
int
offset
,
int
size
)
{
private
CharSequence
[]
newResolved
(
int
size
)
{
CharSequence
[]
resolved
=
new
CharSequence
[
size
];
CharSequence
[]
resolved
=
new
CharSequence
[
size
];
if
(
this
.
resolved
!=
null
)
{
if
(
this
.
resolved
!=
null
)
{
System
.
arraycopy
(
this
.
resolved
,
0
,
resolved
,
0
,
Math
.
min
(
size
,
this
.
size
));
System
.
arraycopy
(
this
.
resolved
,
0
,
resolved
,
0
,
Math
.
min
(
size
,
this
.
size
));
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/EnvironmentPostProcessorApplicationListener.java
View file @
ea55ca99
/*
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
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.
...
@@ -86,10 +86,10 @@ public class EnvironmentPostProcessorApplicationListener implements SmartApplica
...
@@ -86,10 +86,10 @@ public class EnvironmentPostProcessorApplicationListener implements SmartApplica
onApplicationEnvironmentPreparedEvent
((
ApplicationEnvironmentPreparedEvent
)
event
);
onApplicationEnvironmentPreparedEvent
((
ApplicationEnvironmentPreparedEvent
)
event
);
}
}
if
(
event
instanceof
ApplicationPreparedEvent
)
{
if
(
event
instanceof
ApplicationPreparedEvent
)
{
onApplicationPreparedEvent
(
(
ApplicationPreparedEvent
)
event
);
onApplicationPreparedEvent
();
}
}
if
(
event
instanceof
ApplicationFailedEvent
)
{
if
(
event
instanceof
ApplicationFailedEvent
)
{
onApplicationFailedEvent
(
(
ApplicationFailedEvent
)
event
);
onApplicationFailedEvent
();
}
}
}
}
...
@@ -101,11 +101,11 @@ public class EnvironmentPostProcessorApplicationListener implements SmartApplica
...
@@ -101,11 +101,11 @@ public class EnvironmentPostProcessorApplicationListener implements SmartApplica
}
}
}
}
private
void
onApplicationPreparedEvent
(
ApplicationPreparedEvent
event
)
{
private
void
onApplicationPreparedEvent
()
{
finish
();
finish
();
}
}
private
void
onApplicationFailedEvent
(
ApplicationFailedEvent
event
)
{
private
void
onApplicationFailedEvent
()
{
finish
();
finish
();
}
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/DefaultLogbackConfiguration.java
View file @
ea55ca99
/*
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
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.
...
@@ -29,7 +29,6 @@ import ch.qos.logback.core.util.FileSize;
...
@@ -29,7 +29,6 @@ import ch.qos.logback.core.util.FileSize;
import
ch.qos.logback.core.util.OptionHelper
;
import
ch.qos.logback.core.util.OptionHelper
;
import
org.springframework.boot.logging.LogFile
;
import
org.springframework.boot.logging.LogFile
;
import
org.springframework.boot.logging.LoggingInitializationContext
;
/**
/**
* Default logback configuration used by Spring Boot. Uses {@link LogbackConfigurator} to
* Default logback configuration used by Spring Boot. Uses {@link LogbackConfigurator} to
...
@@ -46,7 +45,7 @@ class DefaultLogbackConfiguration {
...
@@ -46,7 +45,7 @@ class DefaultLogbackConfiguration {
private
final
LogFile
logFile
;
private
final
LogFile
logFile
;
DefaultLogbackConfiguration
(
Log
gingInitializationContext
initializationContext
,
Log
File
logFile
)
{
DefaultLogbackConfiguration
(
LogFile
logFile
)
{
this
.
logFile
=
logFile
;
this
.
logFile
=
logFile
;
}
}
...
@@ -106,13 +105,12 @@ class DefaultLogbackConfiguration {
...
@@ -106,13 +105,12 @@ class DefaultLogbackConfiguration {
appender
.
setEncoder
(
encoder
);
appender
.
setEncoder
(
encoder
);
config
.
start
(
encoder
);
config
.
start
(
encoder
);
appender
.
setFile
(
logFile
);
appender
.
setFile
(
logFile
);
setRollingPolicy
(
appender
,
config
,
logFile
);
setRollingPolicy
(
appender
,
config
);
config
.
appender
(
"FILE"
,
appender
);
config
.
appender
(
"FILE"
,
appender
);
return
appender
;
return
appender
;
}
}
private
void
setRollingPolicy
(
RollingFileAppender
<
ILoggingEvent
>
appender
,
LogbackConfigurator
config
,
private
void
setRollingPolicy
(
RollingFileAppender
<
ILoggingEvent
>
appender
,
LogbackConfigurator
config
)
{
String
logFile
)
{
SizeAndTimeBasedRollingPolicy
<
ILoggingEvent
>
rollingPolicy
=
new
SizeAndTimeBasedRollingPolicy
<>();
SizeAndTimeBasedRollingPolicy
<
ILoggingEvent
>
rollingPolicy
=
new
SizeAndTimeBasedRollingPolicy
<>();
rollingPolicy
.
setContext
(
config
.
getContext
());
rollingPolicy
.
setContext
(
config
.
getContext
());
rollingPolicy
.
setFileNamePattern
(
rollingPolicy
.
setFileNamePattern
(
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java
View file @
ea55ca99
...
@@ -151,7 +151,7 @@ public class LogbackLoggingSystem extends Slf4JLoggingSystem {
...
@@ -151,7 +151,7 @@ public class LogbackLoggingSystem extends Slf4JLoggingSystem {
new
LogbackLoggingSystemProperties
(
environment
,
context:
:
putProperty
).
apply
(
logFile
);
new
LogbackLoggingSystemProperties
(
environment
,
context:
:
putProperty
).
apply
(
logFile
);
LogbackConfigurator
configurator
=
debug
?
new
DebugLogbackConfigurator
(
context
)
LogbackConfigurator
configurator
=
debug
?
new
DebugLogbackConfigurator
(
context
)
:
new
LogbackConfigurator
(
context
);
:
new
LogbackConfigurator
(
context
);
new
DefaultLogbackConfiguration
(
initializationContext
,
logFile
).
apply
(
configurator
);
new
DefaultLogbackConfiguration
(
logFile
).
apply
(
configurator
);
context
.
setPackagingDataEnabled
(
true
);
context
.
setPackagingDataEnabled
(
true
);
}
}
...
...
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