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
9632abf8
Commit
9632abf8
authored
Jun 26, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting and cleanup
parent
cd77bae3
Changes
49
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
125 additions
and
122 deletions
+125
-122
OrderedHealthAggregator.java
...ramework/boot/actuate/health/OrderedHealthAggregator.java
+1
-1
EndpointAutoConfigurationTests.java
...actuate/autoconfigure/EndpointAutoConfigurationTests.java
+1
-1
HealthIndicatorAutoConfigurationTests.java
.../autoconfigure/HealthIndicatorAutoConfigurationTests.java
+4
-4
SolrHealthIndicatorTests.java
...amework/boot/actuate/health/SolrHealthIndicatorTests.java
+1
-1
VanillaHealthIndicatorTests.java
...work/boot/actuate/health/VanillaHealthIndicatorTests.java
+1
-1
SolrRepositoriesAutoConfiguration.java
...onfigure/data/solr/SolrRepositoriesAutoConfiguration.java
+1
-1
FreeMarkerAutoConfiguration.java
...autoconfigure/freemarker/FreeMarkerAutoConfiguration.java
+1
-1
VelocityAutoConfiguration.java
...oot/autoconfigure/velocity/VelocityAutoConfiguration.java
+1
-1
ElasticsearchRepositoriesAutoConfigurationTests.java
...arch/ElasticsearchRepositoriesAutoConfigurationTests.java
+0
-1
JpaRepositoriesAutoConfigurationTests.java
...igure/data/jpa/JpaRepositoriesAutoConfigurationTests.java
+0
-1
JpaWebAutoConfigurationTests.java
.../autoconfigure/data/jpa/JpaWebAutoConfigurationTests.java
+0
-1
CityRepository.java
...work/boot/autoconfigure/data/jpa/city/CityRepository.java
+1
-0
SolrRepositoriesAutoConfigurationTests.java
...ure/data/solr/SolrRepositoriesAutoConfigurationTests.java
+0
-1
City.java
...ringframework/boot/autoconfigure/data/solr/city/City.java
+5
-2
DataSourceAutoConfigurationTests.java
.../autoconfigure/jdbc/DataSourceAutoConfigurationTests.java
+7
-6
JmsAutoConfigurationTests.java
...ork/boot/autoconfigure/jms/JmsAutoConfigurationTests.java
+1
-2
ActiveMQPropertiesTests.java
...t/autoconfigure/jms/activemq/ActiveMQPropertiesTests.java
+0
-1
HornetQEmbeddedConfigurationFactoryTests.java
...jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java
+0
-2
HibernateJpaAutoConfigurationTests.java
...configure/orm/jpa/HibernateJpaAutoConfigurationTests.java
+1
-1
RunCommand.java
.../org/springframework/boot/cli/command/run/RunCommand.java
+1
-1
AstUtils.java
.../java/org/springframework/boot/cli/compiler/AstUtils.java
+2
-1
DependencyCustomizer.java
...ringframework/boot/cli/compiler/DependencyCustomizer.java
+1
-1
GroovyCompiler.java
...org/springframework/boot/cli/compiler/GroovyCompiler.java
+2
-1
JUnitCompilerAutoConfiguration.java
...ompiler/autoconfigure/JUnitCompilerAutoConfiguration.java
+2
-4
ReactorCompilerAutoConfiguration.java
...piler/autoconfigure/ReactorCompilerAutoConfiguration.java
+1
-1
SpringBootCompilerAutoConfiguration.java
...er/autoconfigure/SpringBootCompilerAutoConfiguration.java
+4
-2
SpringMvcCompilerAutoConfiguration.java
...ler/autoconfigure/SpringMvcCompilerAutoConfiguration.java
+1
-2
ArtifactCoordinatesResolver.java
...li/compiler/dependencies/ArtifactCoordinatesResolver.java
+1
-1
AetherGrapeEngine.java
...gframework/boot/cli/compiler/grape/AetherGrapeEngine.java
+1
-1
ManagedDependenciesFactory.java
...k/boot/cli/compiler/grape/ManagedDependenciesFactory.java
+1
-2
GroovyTemplate.java
.../java/org/springframework/boot/groovy/GroovyTemplate.java
+2
-2
DependencyCustomizerTests.java
...ramework/boot/cli/compiler/DependencyCustomizerTests.java
+1
-1
CustomVersionManagementTests.java
...ngframework/boot/gradle/CustomVersionManagementTests.java
+1
-1
InstallTests.java
...st/java/org/springframework/boot/gradle/InstallTests.java
+8
-7
MainClassTests.java
.../java/org/springframework/boot/gradle/MainClassTests.java
+3
-2
NoJarTests.java
...test/java/org/springframework/boot/gradle/NoJarTests.java
+2
-2
StarterDependenciesIntegrationTests.java
...ork/boot/starter/StarterDependenciesIntegrationTests.java
+1
-1
ManagementPathSampleActuatorApplicationTests.java
...ctuator/ManagementPathSampleActuatorApplicationTests.java
+5
-5
ServletPathSampleActuatorApplicationTests.java
...e/actuator/ServletPathSampleActuatorApplicationTests.java
+7
-6
ServletPathUnsecureSampleActuatorApplicationTests.java
...or/ServletPathUnsecureSampleActuatorApplicationTests.java
+5
-4
SampleElasticsearchApplicationTests.java
...ta/elasticsearch/SampleElasticsearchApplicationTests.java
+3
-3
SampleSecureApplicationTests.java
...t/java/sample/ui/secure/SampleSecureApplicationTests.java
+12
-12
PropertiesFileDependencies.java
...ork/boot/dependency/tools/PropertiesFileDependencies.java
+5
-5
JarURLConnection.java
...org/springframework/boot/loader/jar/JarURLConnection.java
+2
-1
ExecutableArchiveLauncherTests.java
...framework/boot/loader/ExecutableArchiveLauncherTests.java
+13
-12
InputArgumentsJavaAgentDetectorTests.java
...ork/boot/loader/InputArgumentsJavaAgentDetectorTests.java
+2
-2
JarFileArchiveTests.java
...ingframework/boot/loader/archive/JarFileArchiveTests.java
+3
-4
LoggingApplicationListener.java
...ingframework/boot/logging/LoggingApplicationListener.java
+3
-3
LoggingApplicationListenerTests.java
...amework/boot/logging/LoggingApplicationListenerTests.java
+4
-3
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java
View file @
9632abf8
...
...
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
* <p>
* If a different order is required or a new {@link Status} type will be used, the order
* can be set by calling {@link #setStatusOrder(List)}.
*
*
* @author Christian Dupuis
* @since 1.1.0
*/
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointAutoConfigurationTests.java
View file @
9632abf8
...
...
@@ -42,7 +42,7 @@ import static org.junit.Assert.assertTrue;
/**
* Tests for {@link EndpointAutoConfiguration}.
*
*
* @author Dave Syer
* @author Phillip Webb
* @author Greg Turnquist
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java
View file @
9632abf8
...
...
@@ -21,11 +21,11 @@ import java.util.Map;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.health.DataSourceHealthIndicator
;
import
org.springframework.boot.actuate.health.HealthIndicator
;
import
org.springframework.boot.actuate.health.MongoHealthIndicator
;
import
org.springframework.boot.actuate.health.RabbitHealthIndicator
;
import
org.springframework.boot.actuate.health.RedisHealthIndicator
;
import
org.springframework.boot.actuate.health.DataSourceHealthIndicator
;
import
org.springframework.boot.actuate.health.SolrHealthIndicator
;
import
org.springframework.boot.actuate.health.VanillaHealthIndicator
;
import
org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration
;
...
...
@@ -41,7 +41,7 @@ import static org.junit.Assert.assertEquals;
/**
* Tests for {@link HealthIndicatorAutoConfiguration}.
*
*
* @author Christian Dupuis
*/
public
class
HealthIndicatorAutoConfigurationTests
{
...
...
@@ -149,8 +149,8 @@ public class HealthIndicatorAutoConfigurationTests {
Map
<
String
,
HealthIndicator
>
beans
=
this
.
context
.
getBeansOfType
(
HealthIndicator
.
class
);
assertEquals
(
1
,
beans
.
size
());
assertEquals
(
DataSourceHealthIndicator
.
class
,
beans
.
values
().
iterator
()
.
next
().
getClass
());
assertEquals
(
DataSourceHealthIndicator
.
class
,
beans
.
values
().
iterator
()
.
next
()
.
getClass
());
}
@Test
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SolrHealthIndicatorTests.java
View file @
9632abf8
...
...
@@ -37,7 +37,7 @@ import static org.mockito.Mockito.when;
/**
* Tests for {@link SolrHealthIndicator}
*
*
* @author Andy Wilkinson
*/
public
class
SolrHealthIndicatorTests
{
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/VanillaHealthIndicatorTests.java
View file @
9632abf8
...
...
@@ -22,7 +22,7 @@ import static org.junit.Assert.assertEquals;
/**
* Tests for {@link VanillaHealthIndicator}.
*
*
* @author Phillip Webb
*/
public
class
VanillaHealthIndicatorTests
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfiguration.java
View file @
9632abf8
...
...
@@ -37,7 +37,7 @@ import org.springframework.data.solr.repository.SolrRepository;
* If active auto configuration does the same as
* {@link org.springframework.data.solr.repository.config.EnableSolrRepositories} would
* do.
*
*
* @author Christoph Strobl
* @since 1.1.0
*/
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfiguration.java
View file @
9632abf8
...
...
@@ -44,7 +44,7 @@ import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;
/**
* {@link EnableAutoConfiguration Auto-configuration} for FreeMarker.
*
*
* @author Andy Wilkinson
* @author Dave Syer
* @since 1.1.0
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java
View file @
9632abf8
...
...
@@ -47,7 +47,7 @@ import org.springframework.web.servlet.view.velocity.VelocityViewResolver;
/**
* {@link EnableAutoConfiguration Auto-configuration} for Velocity.
*
*
* @author Andy Wilkinson
* @since 1.1.0
*/
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java
View file @
9632abf8
...
...
@@ -22,7 +22,6 @@ import org.junit.Test;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.data.alt.elasticsearch.CityElasticsearchDbRepository
;
import
org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration
;
import
org.springframework.boot.autoconfigure.data.elasticsearch.city.City
;
import
org.springframework.boot.autoconfigure.data.elasticsearch.city.CityRepository
;
import
org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaRepositoriesAutoConfigurationTests.java
View file @
9632abf8
...
...
@@ -24,7 +24,6 @@ import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfigurati
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.data.alt.mongo.CityMongoDbRepository
;
import
org.springframework.boot.autoconfigure.data.alt.solr.CitySolrRepository
;
import
org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration
;
import
org.springframework.boot.autoconfigure.data.jpa.city.City
;
import
org.springframework.boot.autoconfigure.data.jpa.city.CityRepository
;
import
org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaWebAutoConfigurationTests.java
View file @
9632abf8
...
...
@@ -20,7 +20,6 @@ import org.junit.After;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration
;
import
org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration.JpaWebConfiguration
;
import
org.springframework.boot.autoconfigure.data.jpa.city.City
;
import
org.springframework.boot.autoconfigure.data.jpa.city.CityRepository
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/city/CityRepository.java
View file @
9632abf8
...
...
@@ -22,6 +22,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
public
interface
CityRepository
extends
JpaRepository
<
City
,
Long
>
{
@Override
Page
<
City
>
findAll
(
Pageable
pageable
);
Page
<
City
>
findByNameLikeAndCountryLikeAllIgnoringCase
(
String
name
,
String
country
,
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfigurationTests.java
View file @
9632abf8
...
...
@@ -24,7 +24,6 @@ import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfigurati
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.data.alt.solr.CitySolrRepository
;
import
org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage
;
import
org.springframework.boot.autoconfigure.data.solr.SolrRepositoriesAutoConfiguration
;
import
org.springframework.boot.autoconfigure.data.solr.city.City
;
import
org.springframework.boot.autoconfigure.data.solr.city.CityRepository
;
import
org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/city/City.java
View file @
9632abf8
...
...
@@ -26,8 +26,11 @@ import org.springframework.data.solr.core.mapping.SolrDocument;
@SolrDocument
(
solrCoreName
=
"collection1"
)
public
class
City
{
private
@Id
String
id
;
private
@Indexed
String
name
;
@Id
private
String
id
;
@Indexed
private
String
name
;
public
String
getId
()
{
return
this
.
id
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java
View file @
9632abf8
...
...
@@ -16,11 +16,6 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
jdbc
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.net.URL
;
import
java.net.URLClassLoader
;
import
java.sql.Connection
;
...
...
@@ -50,6 +45,11 @@ import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
import
com.zaxxer.hikari.HikariDataSource
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
* Tests for {@link DataSourceAutoConfiguration}.
*
...
...
@@ -70,7 +70,7 @@ public class DataSourceAutoConfigurationTests {
@After
public
void
restore
()
{
EmbeddedDatabaseConnection
.
override
=
null
;
if
(
context
!=
null
)
{
if
(
context
!=
null
)
{
context
.
close
();
}
}
...
...
@@ -264,6 +264,7 @@ public class DataSourceAutoConfigurationTests {
return
false
;
}
@Override
public
Logger
getParentLogger
()
throws
SQLFeatureNotSupportedException
{
return
Mockito
.
mock
(
Logger
.
class
);
}
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JmsAutoConfigurationTests.java
View file @
9632abf8
...
...
@@ -207,8 +207,7 @@ public class JmsAutoConfigurationTests {
Class
<?>...
additionalClasses
)
{
AnnotationConfigApplicationContext
context
=
new
AnnotationConfigApplicationContext
();
context
.
register
(
additionalClasses
);
context
.
register
(
ActiveMQAutoConfiguration
.
class
,
JmsAutoConfiguration
.
class
);
context
.
register
(
ActiveMQAutoConfiguration
.
class
,
JmsAutoConfiguration
.
class
);
return
context
;
}
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQPropertiesTests.java
View file @
9632abf8
...
...
@@ -17,7 +17,6 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
jms
.
activemq
;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.jms.activemq.ActiveMQProperties
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.core.env.StandardEnvironment
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java
View file @
9632abf8
...
...
@@ -19,8 +19,6 @@ package org.springframework.boot.autoconfigure.jms.hornetq;
import
org.hornetq.core.config.Configuration
;
import
org.hornetq.core.server.JournalType
;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.jms.hornetq.HornetQEmbeddedConfigurationFactory
;
import
org.springframework.boot.autoconfigure.jms.hornetq.HornetQProperties
;
import
static
org
.
hamcrest
.
Matchers
.
endsWith
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java
View file @
9632abf8
...
...
@@ -33,7 +33,7 @@ import static org.junit.Assert.assertThat;
/**
* Tests for {@link HibernateJpaAutoConfiguration}.
*
*
* @author Dave Syer
* @author Phillip Webb
* @author Andy Wilkinson
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/RunCommand.java
View file @
9632abf8
...
...
@@ -106,7 +106,7 @@ public class RunCommand extends OptionParsingCommand {
this
.
runner
=
new
SpringApplicationRunner
(
configuration
,
sourceOptions
.
getSourcesArray
(),
sourceOptions
.
getArgsArray
());
this
.
runner
.
compileAndRun
();
return
ExitStatus
.
OK
;
}
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AstUtils.java
View file @
9632abf8
...
...
@@ -70,7 +70,8 @@ public abstract class AstUtils {
String
...
annotations
)
{
for
(
AnnotationNode
annotationNode
:
node
.
getAnnotations
())
{
for
(
String
annotation
:
annotations
)
{
if
(
PatternMatchUtils
.
simpleMatch
(
annotation
,
annotationNode
.
getClassNode
().
getName
()))
{
if
(
PatternMatchUtils
.
simpleMatch
(
annotation
,
annotationNode
.
getClassNode
().
getName
()))
{
return
true
;
}
}
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java
View file @
9632abf8
...
...
@@ -33,7 +33,7 @@ import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext;
* <p>
* This class provides a fluent API for conditionally adding dependencies. For example:
* {@code dependencies.ifMissing("com.corp.SomeClass").add(module)}.
*
*
* @author Phillip Webb
* @author Andy Wilkinson
*/
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java
View file @
9632abf8
...
...
@@ -265,7 +265,8 @@ public class GroovyCompiler {
public
void
call
(
SourceUnit
source
,
GeneratorContext
context
,
ClassNode
classNode
)
throws
CompilationFailedException
{
ImportCustomizer
importCustomizer
=
new
SmartImportCustomizer
(
source
,
context
,
classNode
);
ImportCustomizer
importCustomizer
=
new
SmartImportCustomizer
(
source
,
context
,
classNode
);
ClassNode
mainClassNode
=
getMainClass
(
source
.
getAST
().
getClasses
());
// Additional auto configuration
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/JUnitCompilerAutoConfiguration.java
View file @
9632abf8
...
...
@@ -42,10 +42,8 @@ public class JUnitCompilerAutoConfiguration extends CompilerAutoConfiguration {
}
@Override
public
void
applyImports
(
ImportCustomizer
imports
)
throws
CompilationFailedException
{
imports
.
addStarImports
(
"org.junit"
)
.
addStaticStars
(
"org.junit.Assert"
)
public
void
applyImports
(
ImportCustomizer
imports
)
throws
CompilationFailedException
{
imports
.
addStarImports
(
"org.junit"
).
addStaticStars
(
"org.junit.Assert"
)
.
addStaticStars
(
"org.hamcrest.MatcherAssert"
)
.
addStaticStars
(
"org.hamcrest.Matchers"
);
}
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/ReactorCompilerAutoConfiguration.java
View file @
9632abf8
...
...
@@ -46,7 +46,7 @@ public class ReactorCompilerAutoConfiguration extends CompilerAutoConfiguration
public
void
applyImports
(
ImportCustomizer
imports
)
{
imports
.
addImports
(
"reactor.core.Reactor"
,
"reactor.core.spec.Reactors"
,
"reactor.core.Observable"
,
"reactor.event.Event"
,
"reactor.function.Functions"
,
"reactor.function.Predicates"
,
"reactor.function.Functions"
,
"reactor.function.Predicates"
,
"reactor.function.Suppliers"
,
"reactor.spring.context.annotation.Consumer"
,
"reactor.spring.context.annotation.Selector"
,
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringBootCompilerAutoConfiguration.java
View file @
9632abf8
...
...
@@ -45,8 +45,10 @@ public class SpringBootCompilerAutoConfiguration extends CompilerAutoConfigurati
@Override
public
void
applyImports
(
ImportCustomizer
imports
)
{
imports
.
addImports
(
"javax.annotation.PostConstruct"
,
"javax.annotation.PreDestroy"
,
"groovy.util.logging.Log"
,
imports
.
addImports
(
"javax.annotation.PostConstruct"
,
"javax.annotation.PreDestroy"
,
"groovy.util.logging.Log"
,
"org.springframework.stereotype.Controller"
,
"org.springframework.stereotype.Service"
,
"org.springframework.stereotype.Component"
,
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringMvcCompilerAutoConfiguration.java
View file @
9632abf8
...
...
@@ -50,8 +50,7 @@ public class SpringMvcCompilerAutoConfiguration extends CompilerAutoConfiguratio
public
void
applyImports
(
ImportCustomizer
imports
)
{
imports
.
addStarImports
(
"org.springframework.web.bind.annotation"
,
"org.springframework.web.servlet.config.annotation"
,
"org.springframework.web.servlet"
,
"org.springframework.http"
,
"org.springframework.web.servlet"
,
"org.springframework.http"
,
"org.springframework.web.servlet.handler"
,
"org.springframework.http"
,
"org.springframework.ui"
,
"groovy.text"
);
imports
.
addStaticImport
(
GroovyTemplate
.
class
.
getName
(),
"template"
);
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/dependencies/ArtifactCoordinatesResolver.java
View file @
9632abf8
...
...
@@ -23,7 +23,7 @@ package org.springframework.boot.cli.compiler.dependencies;
* the relevant piece from the identifier. Alternatively the identifier may be in the form
* {@code artifactId}, in which case coordinate resolution uses implementation-specific
* metadata to resolve the groupId and version.
*
*
* @author Andy Wilkinson
*/
public
interface
ArtifactCoordinatesResolver
{
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java
View file @
9632abf8
...
...
@@ -48,7 +48,7 @@ import org.eclipse.aether.util.filter.DependencyFilterUtils;
* A {@link GrapeEngine} implementation that uses <a
* href="http://eclipse.org/aether">Aether</a>, the dependency resolution system used by
* Maven.
*
*
* @author Andy Wilkinson
* @author Phillip Webb
*/
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/ManagedDependenciesFactory.java
View file @
9632abf8
...
...
@@ -27,8 +27,7 @@ import org.springframework.boot.dependency.tools.ManagedDependencies;
import
org.springframework.boot.dependency.tools.PomDependencies
;
/**
* Factory to create Maven {@link Dependency} objects from Boot
* {@link PomDependencies}.
* Factory to create Maven {@link Dependency} objects from Boot {@link PomDependencies}.
*
* @author Phillip Webb
*/
...
...
spring-boot-cli/src/main/java/org/springframework/boot/groovy/GroovyTemplate.java
View file @
9632abf8
...
...
@@ -55,8 +55,8 @@ public abstract class GroovyTemplate {
return
result
.
toString
();
}
private
static
Template
getTemplate
(
TemplateEngine
engine
,
String
name
)
throws
CompilationFailedException
,
ClassNotFoundException
,
IOException
{
private
static
Template
getTemplate
(
TemplateEngine
engine
,
String
name
)
throws
CompilationFailedException
,
ClassNotFoundException
,
IOException
{
File
file
=
new
File
(
"templates"
,
name
);
if
(
file
.
exists
())
{
...
...
spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/DependencyCustomizerTests.java
View file @
9632abf8
...
...
@@ -39,7 +39,7 @@ import static org.mockito.Mockito.when;
/**
* Tests for {@link DependencyCustomizer}
*
*
* @author Andy Wilkinson
*/
public
class
DependencyCustomizerTests
{
...
...
spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/CustomVersionManagementTests.java
View file @
9632abf8
...
...
@@ -25,7 +25,7 @@ import org.springframework.boot.dependency.tools.ManagedDependencies;
/**
* Tests for using the Gradle plugin's support for custom version management
*
*
* @author Andy Wilkinson
*/
public
class
CustomVersionManagementTests
{
...
...
spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java
View file @
9632abf8
...
...
@@ -22,21 +22,21 @@ import org.springframework.boot.dependency.tools.ManagedDependencies;
/**
* Tests for using the Gradle plugin's support for installing artifacts
*
*
* @author Dave Syer
*/
public
class
InstallTests
{
private
ProjectConnection
project
;
private
static
final
String
BOOT_VERSION
=
ManagedDependencies
.
get
()
.
find
(
"spring-boot"
).
getVersion
();
private
static
final
String
BOOT_VERSION
=
ManagedDependencies
.
get
()
.
find
(
"spring-boot"
).
getVersion
();
@Test
public
void
cleanInstall
()
throws
Exception
{
project
=
new
ProjectCreator
().
createProject
(
"installer"
);
project
.
newBuild
().
forTasks
(
"install"
)
.
withArguments
(
"-PbootVersion="
+
BOOT_VERSION
,
"--stacktrace"
).
run
();
project
.
newBuild
().
forTasks
(
"install"
)
.
withArguments
(
"-PbootVersion="
+
BOOT_VERSION
,
"--stacktrace"
).
run
();
}
@Test
...
...
@@ -44,8 +44,9 @@ public class InstallTests {
project
=
new
ProjectCreator
().
createProject
(
"install-app"
);
// "install" from the application plugin was renamed "installApp" in Gradle
// 1.0
project
.
newBuild
().
forTasks
(
"installApp"
).
withArguments
(
"-PbootVersion="
+
BOOT_VERSION
,
"--stacktrace"
,
"--info"
).
run
();
project
.
newBuild
().
forTasks
(
"installApp"
)
.
withArguments
(
"-PbootVersion="
+
BOOT_VERSION
,
"--stacktrace"
,
"--info"
)
.
run
();
}
}
spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/MainClassTests.java
View file @
9632abf8
...
...
@@ -25,7 +25,7 @@ import org.springframework.boot.dependency.tools.ManagedDependencies;
/**
* Tests for using the Gradle plugin's support for installing artifacts
*
*
* @author Dave Syer
*/
public
class
MainClassTests
{
...
...
@@ -42,7 +42,8 @@ public class MainClassTests {
@Test
public
void
buildFromRunTask
()
{
project
.
newBuild
().
forTasks
(
"build"
).
withArguments
(
"-PbootVersion="
+
BOOT_VERSION
,
"--info"
).
run
();
project
.
newBuild
().
forTasks
(
"build"
)
.
withArguments
(
"-PbootVersion="
+
BOOT_VERSION
,
"--info"
).
run
();
}
}
spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/NoJarTests.java
View file @
9632abf8
...
...
@@ -16,14 +16,14 @@
package
org
.
springframework
.
boot
.
gradle
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
java.io.File
;
import
org.gradle.tooling.ProjectConnection
;
import
org.junit.Test
;
import
org.springframework.boot.dependency.tools.ManagedDependencies
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
/**
* Tests for using the Gradle plugin's support for flat directory repos
*
...
...
spring-boot-integration-tests/src/test/java/org/springframework/boot/starter/StarterDependenciesIntegrationTests.java
View file @
9632abf8
...
...
@@ -38,7 +38,7 @@ import static org.junit.Assert.fail;
/**
* Tests for the various starter projects to check that they don't pull in unwanted
* transitive dependencies when used with Gradle
*
*
* @author Andy Wilkinson
*/
@RunWith
(
Parameterized
.
class
)
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java
View file @
9632abf8
...
...
@@ -16,10 +16,6 @@
package
sample
.
actuator
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.util.Map
;
import
org.junit.Test
;
...
...
@@ -34,6 +30,10 @@ import org.springframework.test.annotation.DirtiesContext;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.web.WebAppConfiguration
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
* Integration tests for endpoints configuration.
*
...
...
@@ -42,7 +42,7 @@ import org.springframework.test.context.web.WebAppConfiguration;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
SampleActuatorApplication
.
class
)
@WebAppConfiguration
@IntegrationTest
({
"server.port=0"
,
"management.context_path=/admin"
})
@IntegrationTest
({
"server.port=0"
,
"management.context_path=/admin"
})
@DirtiesContext
public
class
ManagementPathSampleActuatorApplicationTests
{
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java
View file @
9632abf8
...
...
@@ -16,10 +16,6 @@
package
sample
.
actuator
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.util.Map
;
import
org.junit.Test
;
...
...
@@ -34,6 +30,10 @@ import org.springframework.test.annotation.DirtiesContext;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.web.WebAppConfiguration
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
* Integration tests for endpoints configuration.
*
...
...
@@ -42,7 +42,7 @@ import org.springframework.test.context.web.WebAppConfiguration;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
SampleActuatorApplication
.
class
)
@WebAppConfiguration
@IntegrationTest
({
"server.port=0"
,
"server.servletPath=/spring"
})
@IntegrationTest
({
"server.port=0"
,
"server.servletPath=/spring"
})
@DirtiesContext
public
class
ServletPathSampleActuatorApplicationTests
{
...
...
@@ -53,7 +53,8 @@ public class ServletPathSampleActuatorApplicationTests {
public
void
testErrorPath
()
throws
Exception
{
@SuppressWarnings
(
"rawtypes"
)
ResponseEntity
<
Map
>
entity
=
new
TestRestTemplate
(
"user"
,
"password"
)
.
getForEntity
(
"http://localhost:"
+
this
.
port
+
"/spring/error"
,
Map
.
class
);
.
getForEntity
(
"http://localhost:"
+
this
.
port
+
"/spring/error"
,
Map
.
class
);
assertEquals
(
HttpStatus
.
INTERNAL_SERVER_ERROR
,
entity
.
getStatusCode
());
@SuppressWarnings
(
"unchecked"
)
Map
<
String
,
Object
>
body
=
entity
.
getBody
();
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathUnsecureSampleActuatorApplicationTests.java
View file @
9632abf8
...
...
@@ -16,9 +16,6 @@
package
sample
.
actuator
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
java.util.Map
;
import
org.junit.Test
;
...
...
@@ -33,6 +30,9 @@ import org.springframework.test.annotation.DirtiesContext;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.web.WebAppConfiguration
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
/**
* Integration tests for unsecured service endpoints (even with Spring Security on
* classpath).
...
...
@@ -42,7 +42,8 @@ import org.springframework.test.context.web.WebAppConfiguration;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
SampleActuatorApplication
.
class
)
@WebAppConfiguration
@IntegrationTest
({
"server.port:0"
,
"security.basic.enabled:false"
,
"server.servletPath:/spring"
})
@IntegrationTest
({
"server.port:0"
,
"security.basic.enabled:false"
,
"server.servletPath:/spring"
})
@DirtiesContext
public
class
ServletPathUnsecureSampleActuatorApplicationTests
{
...
...
spring-boot-samples/spring-boot-sample-data-elasticsearch/src/test/java/sample/data/elasticsearch/SampleElasticsearchApplicationTests.java
View file @
9632abf8
...
...
@@ -16,8 +16,6 @@
package
sample
.
data
.
elasticsearch
;
import
static
org
.
junit
.
Assert
.*;
import
java.net.ConnectException
;
import
org.junit.Rule
;
...
...
@@ -25,9 +23,11 @@ import org.junit.Test;
import
org.springframework.boot.test.OutputCapture
;
import
org.springframework.core.NestedCheckedException
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
* Tests for {@link SampleElasticsearchApplication}.
*
*
* @author Artur Konczak
*/
public
class
SampleElasticsearchApplicationTests
{
...
...
spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/ui/secure/SampleSecureApplicationTests.java
View file @
9632abf8
...
...
@@ -16,10 +16,6 @@
package
sample
.
ui
.
secure
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.util.Arrays
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -42,6 +38,10 @@ import org.springframework.test.context.web.WebAppConfiguration;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
* Basic integration tests for demo application.
*
...
...
@@ -65,8 +65,8 @@ public class SampleSecureApplicationTests {
"http://localhost:"
+
this
.
port
,
HttpMethod
.
GET
,
new
HttpEntity
<
Void
>(
headers
),
String
.
class
);
assertEquals
(
HttpStatus
.
FOUND
,
entity
.
getStatusCode
());
assertTrue
(
"Wrong location:\n"
+
entity
.
getHeaders
(),
entity
.
getHeaders
()
.
getLocation
().
toString
().
endsWith
(
port
+
"/login"
));
assertTrue
(
"Wrong location:\n"
+
entity
.
getHeaders
(),
entity
.
getHeaders
()
.
getLocation
().
toString
().
endsWith
(
port
+
"/login"
));
}
@Test
...
...
@@ -74,8 +74,8 @@ public class SampleSecureApplicationTests {
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setAccept
(
Arrays
.
asList
(
MediaType
.
TEXT_HTML
));
ResponseEntity
<
String
>
entity
=
new
TestRestTemplate
().
exchange
(
"http://localhost:"
+
this
.
port
+
"/login"
,
HttpMethod
.
GET
,
new
HttpEntity
<
Void
>(
headers
),
String
.
class
);
"http://localhost:"
+
this
.
port
+
"/login"
,
HttpMethod
.
GET
,
new
HttpEntity
<
Void
>(
headers
),
String
.
class
);
assertEquals
(
HttpStatus
.
OK
,
entity
.
getStatusCode
());
assertTrue
(
"Wrong content:\n"
+
entity
.
getBody
(),
entity
.
getBody
().
contains
(
"_csrf"
));
...
...
@@ -94,8 +94,8 @@ public class SampleSecureApplicationTests {
new
HttpEntity
<
MultiValueMap
<
String
,
String
>>(
form
,
headers
),
String
.
class
);
assertEquals
(
HttpStatus
.
FOUND
,
entity
.
getStatusCode
());
assertTrue
(
"Wrong location:\n"
+
entity
.
getHeaders
(),
entity
.
getHeaders
()
.
getLocation
().
toString
().
endsWith
(
port
+
"/"
));
assertTrue
(
"Wrong location:\n"
+
entity
.
getHeaders
(),
entity
.
getHeaders
()
.
getLocation
().
toString
().
endsWith
(
port
+
"/"
));
assertNotNull
(
"Missing cookie:\n"
+
entity
.
getHeaders
(),
entity
.
getHeaders
().
get
(
"Set-Cookie"
));
}
...
...
@@ -107,8 +107,8 @@ public class SampleSecureApplicationTests {
assertEquals
(
HttpStatus
.
OK
,
page
.
getStatusCode
());
String
cookie
=
page
.
getHeaders
().
getFirst
(
"Set-Cookie"
);
headers
.
set
(
"Cookie"
,
cookie
);
Matcher
matcher
=
Pattern
.
compile
(
"(?s).*name=\"_csrf\".*?value=\"([^\"]+).*"
)
.
matcher
(
page
.
getBody
());
Matcher
matcher
=
Pattern
.
compile
(
"(?s).*name=\"_csrf\".*?value=\"([^\"]+).*"
)
.
matcher
(
page
.
getBody
());
assertTrue
(
"No csrf token: "
+
page
.
getBody
(),
matcher
.
matches
());
headers
.
set
(
"X-CSRF-TOKEN"
,
matcher
.
group
(
1
));
return
headers
;
...
...
spring-boot-tools/spring-boot-dependency-tools/src/main/java/org/springframework/boot/dependency/tools/PropertiesFileDependencies.java
View file @
9632abf8
...
...
@@ -23,9 +23,9 @@ import java.util.Properties;
import
java.util.TreeMap
;
/**
* {@link Dependencies} backed by an external properties file (of the form created
*
by the Spring IO platform). The property key should be the groupId and artifactId (in
*
the form
{@literal groupId:artifactId}) and the value should be the version.
* {@link Dependencies} backed by an external properties file (of the form created
by the
*
Spring IO platform). The property key should be the groupId and artifactId (in the form
* {@literal groupId:artifactId}) and the value should be the version.
*
* @author Phillip Webb
* @since 1.1.0
...
...
@@ -33,8 +33,8 @@ import java.util.TreeMap;
public
class
PropertiesFileDependencies
extends
AbstractDependencies
{
/**
* Create a new {@link PropertiesFileDependencies} instance from the specified
*
input
stream.
* Create a new {@link PropertiesFileDependencies} instance from the specified
input
* stream.
* @param inputStream source input stream (will be closed when properties have been
* loaded)
* @throws IOException
...
...
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java
View file @
9632abf8
...
...
@@ -110,7 +110,8 @@ class JarURLConnection extends java.net.JarURLConnection {
this
.
connected
=
true
;
}
private
void
throwFileNotFound
(
Object
entry
,
JarFile
jarFile
)
throws
FileNotFoundException
{
private
void
throwFileNotFound
(
Object
entry
,
JarFile
jarFile
)
throws
FileNotFoundException
{
if
(
Boolean
.
TRUE
.
equals
(
useFastExceptions
.
get
()))
{
throw
FILE_NOT_FOUND_EXCEPTION
;
}
...
...
spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/ExecutableArchiveLauncherTests.java
View file @
9632abf8
...
...
@@ -33,7 +33,7 @@ import static org.mockito.Mockito.when;
/**
* Tests for {@link ExecutableArchiveLauncher}
*
*
* @author Andy Wilkinson
*/
public
class
ExecutableArchiveLauncherTests
{
...
...
@@ -74,16 +74,17 @@ public class ExecutableArchiveLauncherTests {
when
(
this
.
javaAgentDetector
.
isJavaAgentJar
(
javaAgent
)).
thenReturn
(
true
);
doWithTccl
(
new
URLClassLoader
(
new
URL
[]
{
javaAgent
,
one
}),
new
Callable
<
Void
>()
{
@Override
public
Void
call
()
throws
Exception
{
ClassLoader
classLoader
=
ExecutableArchiveLauncherTests
.
this
.
launcher
.
createClassLoader
(
new
URL
[
0
]);
assertClassLoaderUrls
(
classLoader
,
new
URL
[]
{
one
});
return
null
;
}
});
doWithTccl
(
new
URLClassLoader
(
new
URL
[]
{
javaAgent
,
one
}),
new
Callable
<
Void
>()
{
@Override
public
Void
call
()
throws
Exception
{
ClassLoader
classLoader
=
ExecutableArchiveLauncherTests
.
this
.
launcher
.
createClassLoader
(
new
URL
[
0
]);
assertClassLoaderUrls
(
classLoader
,
new
URL
[]
{
one
});
return
null
;
}
});
}
private
void
assertClassLoaderUrls
(
ClassLoader
classLoader
,
URL
[]
urls
)
{
...
...
@@ -92,7 +93,7 @@ public class ExecutableArchiveLauncherTests {
}
private
static
final
class
UnitTestExecutableArchiveLauncher
extends
ExecutableArchiveLauncher
{
ExecutableArchiveLauncher
{
public
UnitTestExecutableArchiveLauncher
(
JavaAgentDetector
javaAgentDetector
)
{
super
(
javaAgentDetector
);
...
...
spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/InputArgumentsJavaAgentDetectorTests.java
View file @
9632abf8
...
...
@@ -28,7 +28,7 @@ import static org.junit.Assert.assertTrue;
/**
* Tests for {@link InputArgumentsJavaAgentDetector}
*
*
* @author Andy Wilkinson
*/
public
class
InputArgumentsJavaAgentDetectorTests
{
...
...
@@ -39,7 +39,7 @@ public class InputArgumentsJavaAgentDetectorTests {
InputArgumentsJavaAgentDetector
detector
=
new
InputArgumentsJavaAgentDetector
(
Arrays
.
asList
(
"-javaagent:my-agent.jar"
));
assertFalse
(
detector
.
isJavaAgentJar
(
new
File
(
"something-else.jar"
)
.
getCanonicalFile
().
toURI
().
toURL
()));
.
getCanonicalFile
().
toURI
().
toURL
()));
}
@Test
...
...
spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java
View file @
9632abf8
...
...
@@ -78,16 +78,15 @@ public class JarFileArchiveTests {
@Test
public
void
getUrl
()
throws
Exception
{
URL
url
=
this
.
archive
.
getUrl
();
assertThat
(
url
.
toString
(),
equalTo
(
"jar:"
+
this
.
rootJarFileUrl
+
"!/"
));
assertThat
(
url
.
toString
(),
equalTo
(
"jar:"
+
this
.
rootJarFileUrl
+
"!/"
));
}
@Test
public
void
getNestedArchive
()
throws
Exception
{
Entry
entry
=
getEntriesMap
(
this
.
archive
).
get
(
"nested.jar"
);
Archive
nested
=
this
.
archive
.
getNestedArchive
(
entry
);
assertThat
(
nested
.
getUrl
().
toString
(),
equalTo
(
"jar:"
+
this
.
rootJarFileUrl
+
"!/nested.jar!/"
));
assertThat
(
nested
.
getUrl
().
toString
(),
equalTo
(
"jar:"
+
this
.
rootJarFileUrl
+
"!/nested.jar!/"
));
}
@Test
...
...
spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
View file @
9632abf8
...
...
@@ -151,9 +151,9 @@ public class LoggingApplicationListener implements SmartApplicationListener {
// Logback won't read backslashes so add a clean path for it to use
if
(!
StringUtils
.
hasLength
(
System
.
getProperty
(
"LOG_TEMP"
)))
{
String
path
=
System
.
getProperty
(
"java.io.tmpdir"
);
path
=
StringUtils
.
cleanPath
(
path
);
if
(
path
.
endsWith
(
"/"
))
{
path
=
path
.
substring
(
0
,
path
.
length
()-
1
);
path
=
StringUtils
.
cleanPath
(
path
);
if
(
path
.
endsWith
(
"/"
))
{
path
=
path
.
substring
(
0
,
path
.
length
()
-
1
);
}
System
.
setProperty
(
"LOG_TEMP"
,
path
);
}
...
...
spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java
View file @
9632abf8
...
...
@@ -86,10 +86,11 @@ public class LoggingApplicationListenerTests {
}
private
String
tmpDir
()
{
String
path
=
this
.
context
.
getEnvironment
().
resolvePlaceholders
(
"${java.io.tmpdir}"
);
String
path
=
this
.
context
.
getEnvironment
().
resolvePlaceholders
(
"${java.io.tmpdir}"
);
path
=
path
.
replace
(
"\\"
,
"/"
);
if
(
path
.
endsWith
(
"/"
))
{
path
=
path
.
substring
(
0
,
path
.
length
()
-
1
);
if
(
path
.
endsWith
(
"/"
))
{
path
=
path
.
substring
(
0
,
path
.
length
()
-
1
);
}
return
path
;
}
...
...
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