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
a09c64e1
Commit
a09c64e1
authored
Feb 08, 2018
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
70c61381
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
31 additions
and
24 deletions
+31
-24
MetricsAutoConfigurationTests.java
.../autoconfigure/metrics/MetricsAutoConfigurationTests.java
+1
-1
EmbeddedLdapAutoConfigurationTests.java
...ure/ldap/embedded/EmbeddedLdapAutoConfigurationTests.java
+12
-10
WebFluxSecurityConfigurationTests.java
.../security/reactive/WebFluxSecurityConfigurationTests.java
+1
-1
JavaPluginAction.java
.../springframework/boot/gradle/plugin/JavaPluginAction.java
+5
-7
BuildInfoProperties.java
...work/boot/gradle/tasks/buildinfo/BuildInfoProperties.java
+2
-1
LaunchScriptConfiguration.java
...boot/gradle/tasks/bundling/LaunchScriptConfiguration.java
+2
-1
JavaBeanBinder.java
...ramework/boot/context/properties/bind/JavaBeanBinder.java
+3
-3
ConfigurationPropertiesBindingPostProcessorTests.java
...ies/ConfigurationPropertiesBindingPostProcessorTests.java
+1
-0
BinderTests.java
...ngframework/boot/context/properties/bind/BinderTests.java
+1
-0
SecurityConfiguration.java
...sample/actuator/customsecurity/SecurityConfiguration.java
+1
-0
SampleSecureWebFluxCustomSecurityTests.java
...ecure/webflux/SampleSecureWebFluxCustomSecurityTests.java
+1
-0
SampleMethodSecurityApplication.java
...mple/security/method/SampleMethodSecurityApplication.java
+1
-0
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MetricsAutoConfigurationTests.java
View file @
a09c64e1
...
...
@@ -117,7 +117,7 @@ public class MetricsAutoConfigurationTests {
@Test
public
void
propertyBasedMeterFilter
()
{
this
.
contextRunner
.
withPropertyValues
(
"management.metrics.enable.my.org=false"
)
.
run
(
context
->
{
.
run
(
(
context
)
->
{
MeterRegistry
registry
=
context
.
getBean
(
MeterRegistry
.
class
);
registry
.
timer
(
"my.org.timer"
);
assertThat
(
registry
.
find
(
"my.org.timer"
).
timer
()).
isNull
();
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/embedded/EmbeddedLdapAutoConfigurationTests.java
View file @
a09c64e1
...
...
@@ -50,8 +50,10 @@ public class EmbeddedLdapAutoConfigurationTests {
@Test
public
void
testSetDefaultPort
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.ldap.embedded.port:1234"
,
"spring.ldap.embedded.base-dn:dc=spring,dc=org"
).
run
(
context
->
{
this
.
contextRunner
.
withPropertyValues
(
"spring.ldap.embedded.port:1234"
,
"spring.ldap.embedded.base-dn:dc=spring,dc=org"
)
.
run
((
context
)
->
{
InMemoryDirectoryServer
server
=
context
.
getBean
(
InMemoryDirectoryServer
.
class
);
assertThat
(
server
.
getListenPort
()).
isEqualTo
(
1234
);
...
...
@@ -62,7 +64,7 @@ public class EmbeddedLdapAutoConfigurationTests {
public
void
testRandomPortWithEnvironment
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.ldap.embedded.base-dn:dc=spring,dc=org"
)
.
run
(
context
->
{
.
run
(
(
context
)
->
{
InMemoryDirectoryServer
server
=
context
.
getBean
(
InMemoryDirectoryServer
.
class
);
assertThat
(
server
.
getListenPort
()).
isEqualTo
(
context
.
getEnvironment
()
...
...
@@ -90,7 +92,7 @@ public class EmbeddedLdapAutoConfigurationTests {
.
withPropertyValues
(
"spring.ldap.embedded.base-dn:dc=spring,dc=org"
,
"spring.ldap.embedded.credential.username:uid=root"
,
"spring.ldap.embedded.credential.password:boot"
)
.
run
(
context
->
{
.
run
(
(
context
)
->
{
InMemoryDirectoryServer
server
=
context
.
getBean
(
InMemoryDirectoryServer
.
class
);
BindResult
result
=
server
.
bind
(
"uid=root"
,
"boot"
);
...
...
@@ -102,7 +104,7 @@ public class EmbeddedLdapAutoConfigurationTests {
public
void
testSetPartitionSuffix
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.ldap.embedded.base-dn:dc=spring,dc=org"
)
.
run
(
context
->
{
.
run
(
(
context
)
->
{
InMemoryDirectoryServer
server
=
context
.
getBean
(
InMemoryDirectoryServer
.
class
);
assertThat
(
server
.
getBaseDNs
())
...
...
@@ -114,7 +116,7 @@ public class EmbeddedLdapAutoConfigurationTests {
public
void
testSetLdifFile
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.ldap.embedded.base-dn:dc=spring,dc=org"
)
.
run
(
context
->
{
.
run
(
(
context
)
->
{
InMemoryDirectoryServer
server
=
context
.
getBean
(
InMemoryDirectoryServer
.
class
);
assertThat
(
server
...
...
@@ -129,7 +131,7 @@ public class EmbeddedLdapAutoConfigurationTests {
.
withPropertyValues
(
"spring.ldap.embedded.base-dn:dc=spring,dc=org"
)
.
withConfiguration
(
AutoConfigurations
.
of
(
LdapAutoConfiguration
.
class
,
LdapDataAutoConfiguration
.
class
))
.
run
(
context
->
{
.
run
(
(
context
)
->
{
assertThat
(
context
.
getBeanNamesForType
(
LdapTemplate
.
class
).
length
)
.
isEqualTo
(
1
);
LdapTemplate
ldapTemplate
=
context
.
getBean
(
LdapTemplate
.
class
);
...
...
@@ -143,7 +145,7 @@ public class EmbeddedLdapAutoConfigurationTests {
this
.
contextRunner
.
withPropertyValues
(
"spring.ldap.embedded.validation.enabled:false"
,
"spring.ldap.embedded.base-dn:dc=spring,dc=org"
)
.
run
(
context
->
{
.
run
(
(
context
)
->
{
InMemoryDirectoryServer
server
=
context
.
getBean
(
InMemoryDirectoryServer
.
class
);
assertThat
(
server
.
getSchema
()).
isNull
();
...
...
@@ -155,7 +157,7 @@ public class EmbeddedLdapAutoConfigurationTests {
this
.
contextRunner
.
withPropertyValues
(
"spring.ldap.embedded.validation.schema:classpath:custom-schema.ldif"
,
"spring.ldap.embedded.ldif:classpath:custom-schema-sample.ldif"
,
"spring.ldap.embedded.base-dn:dc=spring,dc=org"
).
run
(
context
->
{
"spring.ldap.embedded.base-dn:dc=spring,dc=org"
).
run
(
(
context
)
->
{
InMemoryDirectoryServer
server
=
context
.
getBean
(
InMemoryDirectoryServer
.
class
);
...
...
@@ -174,7 +176,7 @@ public class EmbeddedLdapAutoConfigurationTests {
"spring.ldap.embedded.ldif:classpath:schema-multi-basedn.ldif"
,
"spring.ldap.embedded.base-dn[0]:dc=spring,dc=org"
,
"spring.ldap.embedded.base-dn[1]:dc=pivotal,dc=io"
)
.
run
(
context
->
{
.
run
(
(
context
)
->
{
InMemoryDirectoryServer
server
=
context
.
getBean
(
InMemoryDirectoryServer
.
class
);
assertThat
(
server
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/WebFluxSecurityConfigurationTests.java
View file @
a09c64e1
...
...
@@ -41,7 +41,7 @@ public class WebFluxSecurityConfigurationTests {
this
.
contextRunner
.
withUserConfiguration
(
WebFilterChainProxyConfiguration
.
class
,
WebFluxSecurityConfiguration
.
class
)
.
run
(
context
->
assertThat
(
context
)
.
run
(
(
context
)
->
assertThat
(
context
)
.
doesNotHaveBean
(
WebFluxSecurityConfiguration
.
class
));
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java
View file @
a09c64e1
...
...
@@ -64,7 +64,7 @@ final class JavaPluginAction implements PluginApplicationAction {
disableJarTask
(
project
);
configureBuildTask
(
project
);
BootJar
bootJar
=
configureBootJarTask
(
project
);
configureArtifactPublication
(
project
,
bootJar
);
configureArtifactPublication
(
bootJar
);
configureBootRunTask
(
project
);
configureUtf8Encoding
(
project
);
configureParametersCompilerArg
(
project
);
...
...
@@ -98,7 +98,7 @@ final class JavaPluginAction implements PluginApplicationAction {
return
bootJar
;
}
private
void
configureArtifactPublication
(
Project
project
,
BootJar
bootJar
)
{
private
void
configureArtifactPublication
(
BootJar
bootJar
)
{
ArchivePublishArtifact
artifact
=
new
ArchivePublishArtifact
(
bootJar
);
this
.
singlePublishedArtifact
.
addCandidate
(
artifact
);
}
...
...
@@ -140,14 +140,12 @@ final class JavaPluginAction implements PluginApplicationAction {
}
private
void
configureAdditionalMetadataLocations
(
Project
project
)
{
project
.
afterEvaluate
((
evaluated
)
->
{
project
.
afterEvaluate
((
evaluated
)
->
evaluated
.
getTasks
().
withType
(
JavaCompile
.
class
,
(
compile
)
->
configureAdditionalMetadataLocations
(
project
,
compile
));
});
this
::
configureAdditionalMetadataLocations
));
}
private
void
configureAdditionalMetadataLocations
(
Project
project
,
JavaCompile
compile
)
{
private
void
configureAdditionalMetadataLocations
(
JavaCompile
compile
)
{
compile
.
doFirst
((
task
)
->
{
if
(
hasConfigurationProcessorOnClasspath
(
compile
))
{
findMatchingSourceSet
(
compile
).
ifPresent
((
sourceSet
)
->
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/buildinfo/BuildInfoProperties.java
View file @
a09c64e1
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -27,6 +27,7 @@ import org.gradle.api.Project;
*
* @author Andy Wilkinson
*/
@SuppressWarnings
(
"serial"
)
public
class
BuildInfoProperties
implements
Serializable
{
private
final
transient
Project
project
;
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/LaunchScriptConfiguration.java
View file @
a09c64e1
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -30,6 +30,7 @@ import org.springframework.boot.loader.tools.FileUtils;
* @author Andy Wilkinson
* @since 2.0.0
*/
@SuppressWarnings
(
"serial"
)
public
class
LaunchScriptConfiguration
implements
Serializable
{
private
final
Map
<
String
,
String
>
properties
=
new
HashMap
<>();
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/JavaBeanBinder.java
View file @
a09c64e1
...
...
@@ -129,21 +129,21 @@ class JavaBeanBinder implements BeanBinder {
name
=
Introspector
.
decapitalize
(
name
.
substring
(
3
));
this
.
properties
.
computeIfAbsent
(
name
,
n
->
new
BeanProperty
(
n
,
this
.
resolvableType
))
(
n
)
->
new
BeanProperty
(
n
,
this
.
resolvableType
))
.
addGetter
(
method
);
}
else
if
(
name
.
startsWith
(
"is"
)
&&
parameterCount
==
0
)
{
name
=
Introspector
.
decapitalize
(
name
.
substring
(
2
));
this
.
properties
.
computeIfAbsent
(
name
,
n
->
new
BeanProperty
(
n
,
this
.
resolvableType
))
(
n
)
->
new
BeanProperty
(
n
,
this
.
resolvableType
))
.
addGetter
(
method
);
}
else
if
(
name
.
startsWith
(
"set"
)
&&
parameterCount
==
1
)
{
name
=
Introspector
.
decapitalize
(
name
.
substring
(
3
));
this
.
properties
.
computeIfAbsent
(
name
,
n
->
new
BeanProperty
(
n
,
this
.
resolvableType
))
(
n
)
->
new
BeanProperty
(
n
,
this
.
resolvableType
))
.
addSetter
(
method
);
}
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessorTests.java
View file @
a09c64e1
...
...
@@ -287,6 +287,7 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
assertThat
(
foo
.
getFoos
().
get
(
"1"
)).
isNotNull
();
}
@SuppressWarnings
(
"rawtypes"
)
@Test
public
void
bindToBeanWithGenerics
()
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BinderTests.java
View file @
a09c64e1
...
...
@@ -280,6 +280,7 @@ public class BinderTests {
this
.
binder
.
bind
(
"foo"
,
target
);
}
@SuppressWarnings
(
"rawtypes"
)
@Test
public
void
bindToBeanWithUnresolvableGenerics
()
{
MockConfigurationPropertySource
source
=
new
MockConfigurationPropertySource
();
...
...
spring-boot-samples/spring-boot-sample-actuator-custom-security/src/main/java/sample/actuator/customsecurity/SecurityConfiguration.java
View file @
a09c64e1
...
...
@@ -28,6 +28,7 @@ import org.springframework.security.provisioning.InMemoryUserDetailsManager;
@Configuration
public
class
SecurityConfiguration
extends
WebSecurityConfigurerAdapter
{
@SuppressWarnings
(
"deprecation"
)
@Bean
public
InMemoryUserDetailsManager
inMemoryUserDetailsManager
()
{
return
new
InMemoryUserDetailsManager
(
...
...
spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxCustomSecurityTests.java
View file @
a09c64e1
...
...
@@ -87,6 +87,7 @@ public class SampleSecureWebFluxCustomSecurityTests {
@Configuration
static
class
SecurityConfiguration
{
@SuppressWarnings
(
"deprecation"
)
@Bean
public
MapReactiveUserDetailsService
userDetailsService
()
{
return
new
MapReactiveUserDetailsService
(
...
...
spring-boot-samples/spring-boot-sample-web-method-security/src/main/java/sample/security/method/SampleMethodSecurityApplication.java
View file @
a09c64e1
...
...
@@ -70,6 +70,7 @@ public class SampleMethodSecurityApplication implements WebMvcConfigurer {
@Configuration
protected
static
class
AuthenticationSecurity
{
@SuppressWarnings
(
"deprecation"
)
@Bean
public
InMemoryUserDetailsManager
inMemoryUserDetailsManager
()
throws
Exception
{
return
new
InMemoryUserDetailsManager
(
...
...
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