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