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
b4c3f4f5
Commit
b4c3f4f5
authored
Nov 28, 2016
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.5.x'
parents
48703494
ec731442
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
39 additions
and
34 deletions
+39
-34
pom.xml
spring-boot-actuator-docs/pom.xml
+1
-1
pom.xml
spring-boot-autoconfigure/pom.xml
+0
-1
CouchbaseAutoConfiguration.java
...t/autoconfigure/couchbase/CouchbaseAutoConfiguration.java
+4
-4
DataSourceConfiguration.java
...work/boot/autoconfigure/jdbc/DataSourceConfiguration.java
+12
-0
ValidationAutoConfiguration.java
...autoconfigure/validation/ValidationAutoConfiguration.java
+2
-2
CassandraAutoConfigurationTests.java
...oconfigure/cassandra/CassandraAutoConfigurationTests.java
+2
-2
ConditionalOnMissingBeanWithFilteredClasspathTests.java
...n/ConditionalOnMissingBeanWithFilteredClasspathTests.java
+1
-1
SessionAutoConfigurationHazelcastTests.java
...igure/session/SessionAutoConfigurationHazelcastTests.java
+3
-2
SessionAutoConfigurationTests.java
.../autoconfigure/session/SessionAutoConfigurationTests.java
+0
-2
ValidationAutoConfigurationTests.java
...onfigure/validation/ValidationAutoConfigurationTests.java
+3
-1
ValidationAutoConfigurationWithHibernateValidatorMissingElImplTests.java
...onfigurationWithHibernateValidatorMissingElImplTests.java
+2
-2
ServerPropertiesTests.java
...amework/boot/autoconfigure/web/ServerPropertiesTests.java
+0
-5
TestDatabaseAutoConfigurationTests.java
...configure/orm/jpa/TestDatabaseAutoConfigurationTests.java
+0
-1
Handler.java
...ain/java/org/springframework/boot/loader/jar/Handler.java
+9
-10
No files found.
spring-boot-actuator-docs/pom.xml
View file @
b4c3f4f5
...
@@ -18,11 +18,11 @@
...
@@ -18,11 +18,11 @@
<main.basedir>
${basedir}/..
</main.basedir>
<main.basedir>
${basedir}/..
</main.basedir>
</properties>
</properties>
<dependencies>
<dependencies>
<!-- Compile -->
<dependency>
<dependency>
<groupId>
org.springframework.hateoas
</groupId>
<groupId>
org.springframework.hateoas
</groupId>
<artifactId>
spring-hateoas
</artifactId>
<artifactId>
spring-hateoas
</artifactId>
</dependency>
</dependency>
<!-- Provided -->
<!-- Provided -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
...
spring-boot-autoconfigure/pom.xml
View file @
b4c3f4f5
...
@@ -627,7 +627,6 @@
...
@@ -627,7 +627,6 @@
<dependency>
<dependency>
<groupId>
org.springframework.kafka
</groupId>
<groupId>
org.springframework.kafka
</groupId>
<artifactId>
spring-kafka-test
</artifactId>
<artifactId>
spring-kafka-test
</artifactId>
<version>
${spring-kafka.version}
</version>
<scope>
test
</scope>
<scope>
test
</scope>
<exclusions>
<exclusions>
<exclusion>
<exclusion>
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/couchbase/CouchbaseAutoConfiguration.java
View file @
b4c3f4f5
...
@@ -49,8 +49,7 @@ import org.springframework.context.annotation.Primary;
...
@@ -49,8 +49,7 @@ import org.springframework.context.annotation.Primary;
public
class
CouchbaseAutoConfiguration
{
public
class
CouchbaseAutoConfiguration
{
@Configuration
@Configuration
@ConditionalOnMissingBean
(
value
=
CouchbaseConfiguration
.
class
,
@ConditionalOnMissingBean
(
value
=
CouchbaseConfiguration
.
class
,
type
=
"org.springframework.data.couchbase.config.CouchbaseConfigurer"
)
type
=
"org.springframework.data.couchbase.config.CouchbaseConfigurer"
)
public
static
class
CouchbaseConfiguration
{
public
static
class
CouchbaseConfiguration
{
private
final
CouchbaseProperties
properties
;
private
final
CouchbaseProperties
properties
;
...
@@ -124,8 +123,9 @@ public class CouchbaseAutoConfiguration {
...
@@ -124,8 +123,9 @@ public class CouchbaseAutoConfiguration {
* Determine if Couchbase should be configured. This happens if either the
* Determine if Couchbase should be configured. This happens if either the
* user-configuration defines a {@code CouchbaseConfigurer} or if at least the
* user-configuration defines a {@code CouchbaseConfigurer} or if at least the
* "bootstrapHosts" property is specified.
* "bootstrapHosts" property is specified.
* <p>The reason why we check for the presence of {@code CouchbaseConfigurer} is
* <p>
* that it might use {@link CouchbaseProperties} for its internal customization.
* The reason why we check for the presence of {@code CouchbaseConfigurer} is that it
* might use {@link CouchbaseProperties} for its internal customization.
*/
*/
static
class
CouchbaseCondition
extends
AnyNestedCondition
{
static
class
CouchbaseCondition
extends
AnyNestedCondition
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration.java
View file @
b4c3f4f5
...
@@ -42,6 +42,9 @@ abstract class DataSourceConfiguration {
...
@@ -42,6 +42,9 @@ abstract class DataSourceConfiguration {
return
(
T
)
properties
.
initializeDataSourceBuilder
().
type
(
type
).
build
();
return
(
T
)
properties
.
initializeDataSourceBuilder
().
type
(
type
).
build
();
}
}
/**
* Tomcat Pool DataSource configuration.
*/
@ConditionalOnClass
(
org
.
apache
.
tomcat
.
jdbc
.
pool
.
DataSource
.
class
)
@ConditionalOnClass
(
org
.
apache
.
tomcat
.
jdbc
.
pool
.
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.tomcat.jdbc.pool.DataSource"
,
matchIfMissing
=
true
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.tomcat.jdbc.pool.DataSource"
,
matchIfMissing
=
true
)
static
class
Tomcat
extends
DataSourceConfiguration
{
static
class
Tomcat
extends
DataSourceConfiguration
{
...
@@ -64,6 +67,9 @@ abstract class DataSourceConfiguration {
...
@@ -64,6 +67,9 @@ abstract class DataSourceConfiguration {
}
}
/**
* Hikari DataSource configuration.
*/
@ConditionalOnClass
(
HikariDataSource
.
class
)
@ConditionalOnClass
(
HikariDataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"com.zaxxer.hikari.HikariDataSource"
,
matchIfMissing
=
true
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"com.zaxxer.hikari.HikariDataSource"
,
matchIfMissing
=
true
)
static
class
Hikari
extends
DataSourceConfiguration
{
static
class
Hikari
extends
DataSourceConfiguration
{
...
@@ -75,6 +81,9 @@ abstract class DataSourceConfiguration {
...
@@ -75,6 +81,9 @@ abstract class DataSourceConfiguration {
}
}
}
}
/**
* DBCP DataSource configuration.
*/
@ConditionalOnClass
(
org
.
apache
.
commons
.
dbcp2
.
BasicDataSource
.
class
)
@ConditionalOnClass
(
org
.
apache
.
commons
.
dbcp2
.
BasicDataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.commons.dbcp2.BasicDataSource"
,
matchIfMissing
=
true
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.commons.dbcp2.BasicDataSource"
,
matchIfMissing
=
true
)
static
class
Dbcp2
extends
DataSourceConfiguration
{
static
class
Dbcp2
extends
DataSourceConfiguration
{
...
@@ -88,6 +97,9 @@ abstract class DataSourceConfiguration {
...
@@ -88,6 +97,9 @@ abstract class DataSourceConfiguration {
}
}
}
}
/**
* Generic DataSource configuration.
*/
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
)
static
class
Generic
{
static
class
Generic
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.java
View file @
b4c3f4f5
...
@@ -58,8 +58,8 @@ public class ValidationAutoConfiguration {
...
@@ -58,8 +58,8 @@ public class ValidationAutoConfiguration {
@Override
@Override
public
ConditionOutcome
getMatchOutcome
(
ConditionContext
context
,
public
ConditionOutcome
getMatchOutcome
(
ConditionContext
context
,
AnnotatedTypeMetadata
metadata
)
{
AnnotatedTypeMetadata
metadata
)
{
ConditionMessage
.
Builder
message
=
ConditionMessage
.
forCondition
(
ConditionMessage
.
Builder
message
=
ConditionMessage
getClass
().
getName
());
.
forCondition
(
getClass
().
getName
());
try
{
try
{
Validation
.
buildDefaultValidatorFactory
().
getValidator
();
Validation
.
buildDefaultValidatorFactory
().
getValidator
();
return
ConditionOutcome
.
match
(
message
.
available
(
"JSR-303 provider"
));
return
ConditionOutcome
.
match
(
message
.
available
(
"JSR-303 provider"
));
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfigurationTests.java
View file @
b4c3f4f5
...
@@ -66,7 +66,8 @@ public class CassandraAutoConfigurationTests {
...
@@ -66,7 +66,8 @@ public class CassandraAutoConfigurationTests {
public
void
createCustomizeCluster
()
{
public
void
createCustomizeCluster
()
{
load
(
ClusterConfig
.
class
);
load
(
ClusterConfig
.
class
);
assertThat
(
this
.
context
.
getBeanNamesForType
(
Cluster
.
class
).
length
).
isEqualTo
(
1
);
assertThat
(
this
.
context
.
getBeanNamesForType
(
Cluster
.
class
).
length
).
isEqualTo
(
1
);
assertThat
(
this
.
context
.
getBeanNamesForType
(
ClusterCustomizer
.
class
).
length
).
isEqualTo
(
1
);
assertThat
(
this
.
context
.
getBeanNamesForType
(
ClusterCustomizer
.
class
).
length
)
.
isEqualTo
(
1
);
}
}
private
void
load
(
String
...
environment
)
{
private
void
load
(
String
...
environment
)
{
...
@@ -85,7 +86,6 @@ public class CassandraAutoConfigurationTests {
...
@@ -85,7 +86,6 @@ public class CassandraAutoConfigurationTests {
this
.
context
=
ctx
;
this
.
context
=
ctx
;
}
}
@Configuration
@Configuration
static
class
ClusterConfig
{
static
class
ClusterConfig
{
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBeanWithFilteredClasspathTests.java
View file @
b4c3f4f5
...
@@ -53,7 +53,6 @@ public class ConditionalOnMissingBeanWithFilteredClasspathTests {
...
@@ -53,7 +53,6 @@ public class ConditionalOnMissingBeanWithFilteredClasspathTests {
assertThat
(
this
.
context
.
containsBean
(
"foo"
)).
isTrue
();
assertThat
(
this
.
context
.
containsBean
(
"foo"
)).
isTrue
();
}
}
@Configuration
@Configuration
static
class
OnBeanTypeConfiguration
{
static
class
OnBeanTypeConfiguration
{
...
@@ -66,6 +65,7 @@ public class ConditionalOnMissingBeanWithFilteredClasspathTests {
...
@@ -66,6 +65,7 @@ public class ConditionalOnMissingBeanWithFilteredClasspathTests {
}
}
static
class
TestCacheManager
extends
CaffeineCacheManager
{
static
class
TestCacheManager
extends
CaffeineCacheManager
{
}
}
}
}
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationHazelcastTests.java
View file @
b4c3f4f5
...
@@ -70,8 +70,9 @@ public class SessionAutoConfigurationHazelcastTests
...
@@ -70,8 +70,9 @@ public class SessionAutoConfigurationHazelcastTests
"spring.session.hazelcast.flush-mode=immediate"
);
"spring.session.hazelcast.flush-mode=immediate"
);
HazelcastSessionRepository
repository
=
validateSessionRepository
(
HazelcastSessionRepository
repository
=
validateSessionRepository
(
HazelcastSessionRepository
.
class
);
HazelcastSessionRepository
.
class
);
assertThat
(
new
DirectFieldAccessor
(
repository
).
getPropertyValue
(
assertThat
(
new
DirectFieldAccessor
(
repository
)
"hazelcastFlushMode"
)).
isEqualTo
(
HazelcastFlushMode
.
IMMEDIATE
);
.
getPropertyValue
(
"hazelcastFlushMode"
))
.
isEqualTo
(
HazelcastFlushMode
.
IMMEDIATE
);
}
}
@Configuration
@Configuration
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationTests.java
View file @
b4c3f4f5
...
@@ -97,7 +97,6 @@ public class SessionAutoConfigurationTests extends AbstractSessionAutoConfigurat
...
@@ -97,7 +97,6 @@ public class SessionAutoConfigurationTests extends AbstractSessionAutoConfigurat
}
}
@Test
@Test
@SuppressWarnings
(
"unchecked"
)
public
void
mongoSessionStore
()
{
public
void
mongoSessionStore
()
{
load
(
Arrays
.
asList
(
EmbeddedMongoAutoConfiguration
.
class
,
load
(
Arrays
.
asList
(
EmbeddedMongoAutoConfiguration
.
class
,
MongoAutoConfiguration
.
class
,
MongoDataAutoConfiguration
.
class
),
MongoAutoConfiguration
.
class
,
MongoDataAutoConfiguration
.
class
),
...
@@ -106,7 +105,6 @@ public class SessionAutoConfigurationTests extends AbstractSessionAutoConfigurat
...
@@ -106,7 +105,6 @@ public class SessionAutoConfigurationTests extends AbstractSessionAutoConfigurat
}
}
@Test
@Test
@SuppressWarnings
(
"unchecked"
)
public
void
mongoSessionStoreWithCustomizations
()
{
public
void
mongoSessionStoreWithCustomizations
()
{
load
(
Arrays
.
asList
(
EmbeddedMongoAutoConfiguration
.
class
,
load
(
Arrays
.
asList
(
EmbeddedMongoAutoConfiguration
.
class
,
MongoAutoConfiguration
.
class
,
MongoDataAutoConfiguration
.
class
),
MongoAutoConfiguration
.
class
,
MongoDataAutoConfiguration
.
class
),
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationTests.java
View file @
b4c3f4f5
...
@@ -65,7 +65,8 @@ public class ValidationAutoConfigurationTests {
...
@@ -65,7 +65,8 @@ public class ValidationAutoConfigurationTests {
load
(
SampleConfiguration
.
class
);
load
(
SampleConfiguration
.
class
);
assertThat
(
this
.
context
.
getBean
(
MethodValidationPostProcessor
.
class
))
assertThat
(
this
.
context
.
getBean
(
MethodValidationPostProcessor
.
class
))
.
isSameAs
(
this
.
context
.
getBean
(
"testMethodValidationPostProcessor"
));
.
isSameAs
(
this
.
context
.
getBean
(
"testMethodValidationPostProcessor"
));
assertThat
(
this
.
context
.
getBeansOfType
(
MethodValidationPostProcessor
.
class
)).
hasSize
(
1
);
assertThat
(
this
.
context
.
getBeansOfType
(
MethodValidationPostProcessor
.
class
))
.
hasSize
(
1
);
}
}
public
void
load
(
Class
<?>
config
)
{
public
void
load
(
Class
<?>
config
)
{
...
@@ -84,6 +85,7 @@ public class ValidationAutoConfigurationTests {
...
@@ -84,6 +85,7 @@ public class ValidationAutoConfigurationTests {
public
void
doSomething
(
@Size
(
min
=
3
,
max
=
10
)
String
name
)
{
public
void
doSomething
(
@Size
(
min
=
3
,
max
=
10
)
String
name
)
{
}
}
}
}
@Configuration
@Configuration
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationWithHibernateValidatorMissingElImplTests.java
View file @
b4c3f4f5
...
@@ -28,8 +28,8 @@ import org.springframework.validation.beanvalidation.MethodValidationPostProcess
...
@@ -28,8 +28,8 @@ import org.springframework.validation.beanvalidation.MethodValidationPostProcess
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
/**
/**
* Test for {
{@link ValidationAutoConfiguration} when Hibernate validator is present
* Test for {
@link ValidationAutoConfiguration} when Hibernate validator is present but no
*
but no
EL implementation is available.
* EL implementation is available.
*
*
* @author Stephane Nicoll
* @author Stephane Nicoll
*/
*/
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
View file @
b4c3f4f5
...
@@ -425,10 +425,8 @@ public class ServerPropertiesTests {
...
@@ -425,10 +425,8 @@ public class ServerPropertiesTests {
map
.
put
(
"server.tomcat.port-header"
,
"x-my-forward-port"
);
map
.
put
(
"server.tomcat.port-header"
,
"x-my-forward-port"
);
map
.
put
(
"server.tomcat.protocol-header-https-value"
,
"On"
);
map
.
put
(
"server.tomcat.protocol-header-https-value"
,
"On"
);
bindProperties
(
map
);
bindProperties
(
map
);
TomcatEmbeddedServletContainerFactory
container
=
new
TomcatEmbeddedServletContainerFactory
();
TomcatEmbeddedServletContainerFactory
container
=
new
TomcatEmbeddedServletContainerFactory
();
this
.
properties
.
customize
(
container
);
this
.
properties
.
customize
(
container
);
assertThat
(
container
.
getEngineValves
()).
hasSize
(
1
);
assertThat
(
container
.
getEngineValves
()).
hasSize
(
1
);
Valve
valve
=
container
.
getEngineValves
().
iterator
().
next
();
Valve
valve
=
container
.
getEngineValves
().
iterator
().
next
();
assertThat
(
valve
).
isInstanceOf
(
RemoteIpValve
.
class
);
assertThat
(
valve
).
isInstanceOf
(
RemoteIpValve
.
class
);
...
@@ -445,7 +443,6 @@ public class ServerPropertiesTests {
...
@@ -445,7 +443,6 @@ public class ServerPropertiesTests {
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"server.tomcat.accept-count"
,
"10"
);
map
.
put
(
"server.tomcat.accept-count"
,
"10"
);
bindProperties
(
map
);
bindProperties
(
map
);
TomcatEmbeddedServletContainerFactory
container
=
new
TomcatEmbeddedServletContainerFactory
();
TomcatEmbeddedServletContainerFactory
container
=
new
TomcatEmbeddedServletContainerFactory
();
this
.
properties
.
customize
(
container
);
this
.
properties
.
customize
(
container
);
TomcatEmbeddedServletContainer
embeddedContainer
=
(
TomcatEmbeddedServletContainer
)
container
TomcatEmbeddedServletContainer
embeddedContainer
=
(
TomcatEmbeddedServletContainer
)
container
...
@@ -459,7 +456,6 @@ public class ServerPropertiesTests {
...
@@ -459,7 +456,6 @@ public class ServerPropertiesTests {
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"server.tomcat.max-connections"
,
"5"
);
map
.
put
(
"server.tomcat.max-connections"
,
"5"
);
bindProperties
(
map
);
bindProperties
(
map
);
TomcatEmbeddedServletContainerFactory
container
=
new
TomcatEmbeddedServletContainerFactory
();
TomcatEmbeddedServletContainerFactory
container
=
new
TomcatEmbeddedServletContainerFactory
();
this
.
properties
.
customize
(
container
);
this
.
properties
.
customize
(
container
);
TomcatEmbeddedServletContainer
embeddedContainer
=
(
TomcatEmbeddedServletContainer
)
container
TomcatEmbeddedServletContainer
embeddedContainer
=
(
TomcatEmbeddedServletContainer
)
container
...
@@ -473,7 +469,6 @@ public class ServerPropertiesTests {
...
@@ -473,7 +469,6 @@ public class ServerPropertiesTests {
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"server.tomcat.max-http-post-size"
,
"10000"
);
map
.
put
(
"server.tomcat.max-http-post-size"
,
"10000"
);
bindProperties
(
map
);
bindProperties
(
map
);
TomcatEmbeddedServletContainerFactory
container
=
new
TomcatEmbeddedServletContainerFactory
();
TomcatEmbeddedServletContainerFactory
container
=
new
TomcatEmbeddedServletContainerFactory
();
this
.
properties
.
customize
(
container
);
this
.
properties
.
customize
(
container
);
TomcatEmbeddedServletContainer
embeddedContainer
=
(
TomcatEmbeddedServletContainer
)
container
TomcatEmbeddedServletContainer
embeddedContainer
=
(
TomcatEmbeddedServletContainer
)
container
...
...
spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestDatabaseAutoConfigurationTests.java
View file @
b4c3f4f5
...
@@ -60,7 +60,6 @@ public class TestDatabaseAutoConfigurationTests {
...
@@ -60,7 +60,6 @@ public class TestDatabaseAutoConfigurationTests {
DataSource
datasource
=
this
.
context
.
getBean
(
DataSource
.
class
);
DataSource
datasource
=
this
.
context
.
getBean
(
DataSource
.
class
);
JdbcTemplate
jdbcTemplate
=
new
JdbcTemplate
(
datasource
);
JdbcTemplate
jdbcTemplate
=
new
JdbcTemplate
(
datasource
);
jdbcTemplate
.
execute
(
"create table example (id int, name varchar);"
);
jdbcTemplate
.
execute
(
"create table example (id int, name varchar);"
);
ConfigurableApplicationContext
anotherContext
=
doLoad
(
ConfigurableApplicationContext
anotherContext
=
doLoad
(
ExistingDataSourceConfiguration
.
class
);
ExistingDataSourceConfiguration
.
class
);
try
{
try
{
...
...
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/Handler.java
View file @
b4c3f4f5
...
@@ -198,24 +198,23 @@ public class Handler extends URLStreamHandler {
...
@@ -198,24 +198,23 @@ public class Handler extends URLStreamHandler {
@Override
@Override
protected
int
hashCode
(
URL
u
)
{
protected
int
hashCode
(
URL
u
)
{
int
result
=
0
;
return
hashCode
(
u
.
getProtocol
(),
u
.
getFile
());
String
protocol
=
u
.
getProtocol
();
}
if
(
protocol
!=
null
)
{
result
+=
protocol
.
hashCode
();
private
int
hashCode
(
String
protocol
,
String
file
)
{
}
int
result
=
(
protocol
==
null
?
0
:
protocol
.
hashCode
());
String
file
=
u
.
getFile
();
int
separatorIndex
=
file
.
indexOf
(
SEPARATOR
);
int
separatorIndex
=
file
.
indexOf
(
SEPARATOR
);
if
(
separatorIndex
==
-
1
)
{
if
(
separatorIndex
==
-
1
)
{
return
result
+
file
.
hashCode
();
return
result
+
file
.
hashCode
();
}
}
String
fileWithoutEntry
=
file
.
substring
(
0
,
separatorIndex
);
String
source
=
file
.
substring
(
0
,
separatorIndex
);
String
entry
=
canonicalize
(
file
.
substring
(
separatorIndex
+
2
));
try
{
try
{
result
+=
new
URL
(
fileWithoutEntry
).
hashCode
();
result
+=
new
URL
(
source
).
hashCode
();
}
}
catch
(
MalformedURLException
ex
)
{
catch
(
MalformedURLException
ex
)
{
result
+=
fileWithoutEntry
.
hashCode
();
result
+=
source
.
hashCode
();
}
}
String
entry
=
canonicalize
(
file
.
substring
(
separatorIndex
+
2
));
result
+=
entry
.
hashCode
();
result
+=
entry
.
hashCode
();
return
result
;
return
result
;
}
}
...
...
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