driver : DRIVERS.entrySet()) {
if (urlWithoutPrefix.startsWith(":" + driver.getKey() + ":")) {
- result = driver.getValue();
-
- break;
+ return driver.getValue();
}
}
-
- return result;
+ return null;
}
}
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.java
index 3007965c586..f5cde4c5e72 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.java
@@ -33,7 +33,7 @@ import com.mongodb.MongoClientOptions;
/**
* {@link EnableAutoConfiguration Auto-configuration} for Mongo.
- *
+ *
* @author Dave Syer
* @author Oliver Gierke
* @author Phillip Webb
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryBuilder.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryBuilder.java
index 9b0f793732a..bb14ef2d31e 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryBuilder.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryBuilder.java
@@ -71,8 +71,6 @@ public class EntityManagerFactoryBuilder {
/**
* An optional callback for new entity manager factory beans.
- *
- * @author Dave Syer
*/
public void setCallback(EntityManagerFactoryBeanCallback callback) {
this.callback = callback;
@@ -171,8 +169,6 @@ public class EntityManagerFactoryBuilder {
/**
* A callback for new entity manager factory beans created by a Builder.
- *
- * @author Dave Syer
*/
public static interface EntityManagerFactoryBeanCallback {
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/AuthenticationManagerConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/AuthenticationManagerConfiguration.java
index ce13fdd677a..fb0345f03a1 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/AuthenticationManagerConfiguration.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/AuthenticationManagerConfiguration.java
@@ -128,8 +128,8 @@ public class AuthenticationManagerConfiguration extends
User user = AuthenticationManagerConfiguration.this.security.getUser();
if (user.isDefaultPassword()) {
- logger.info("\n\nUsing default security password: "
- + user.getPassword() + "\n\n");
+ logger.info("\n\nUsing default security password: " + user.getPassword()
+ + "\n\n");
}
this.defaultAuth = new AuthenticationManagerBuilder(
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java
index bba7ca30941..d793b704549 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java
@@ -17,12 +17,13 @@
package org.springframework.boot.autoconfigure.template;
import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.core.Ordered;
import org.springframework.web.servlet.view.AbstractTemplateViewResolver;
/**
* Abstract base class for {@link ConfigurationProperties} for
* {@link AbstractTemplateViewResolver view resolvers}.
- *
+ *
* @author Andy Wilkinson
* @since 1.1.0
*/
@@ -155,4 +156,25 @@ public abstract class AbstractTemplateViewResolverProperties {
public void setExposeSpringMacroHelpers(boolean exposeSpringMacroHelpers) {
this.exposeSpringMacroHelpers = exposeSpringMacroHelpers;
}
+
+ /**
+ * Apply the given properties to a {@link AbstractTemplateViewResolver}.
+ * @param resolver the resolver to apply the properties to.
+ */
+ protected void applyToViewResolver(AbstractTemplateViewResolver resolver) {
+ resolver.setPrefix(getPrefix());
+ resolver.setSuffix(getSuffix());
+ resolver.setCache(isCache());
+ resolver.setContentType(getContentType());
+ resolver.setViewNames(getViewNames());
+ resolver.setExposeRequestAttributes(isExposeRequestAttributes());
+ resolver.setAllowRequestOverride(isAllowRequestOverride());
+ resolver.setExposeSessionAttributes(isExposeSessionAttributes());
+ resolver.setExposeSpringMacroHelpers(isExposeSpringMacroHelpers());
+ resolver.setRequestContextAttribute(getRequestContextAttribute());
+ // The resolver usually acts as a fallback resolver (e.g. like a
+ // InternalResourceViewResolver) so it needs to have low precedence
+ resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 5);
+ }
+
}
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateViewResolverConfigurer.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateViewResolverConfigurer.java
deleted file mode 100644
index 25128b4f7c7..00000000000
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateViewResolverConfigurer.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2012-2014 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.boot.autoconfigure.template;
-
-import org.springframework.core.Ordered;
-import org.springframework.web.servlet.view.AbstractTemplateViewResolver;
-
-/**
- * Helper class for use by configuration classes that provide an
- * {@link AbstractTemplateViewResolver} bean.
- *
- * @author Andy Wilkinson
- */
-public class TemplateViewResolverConfigurer {
-
- /**
- * Configures the {@code resolver} using the given {@code properties} and defaults.
- *
- * @param resolver The resolver to configure
- * @param properties The properties to use to configure the resolver
- */
- public void configureTemplateViewResolver(AbstractTemplateViewResolver resolver,
- AbstractTemplateViewResolverProperties properties) {
-
- resolver.setPrefix(properties.getPrefix());
- resolver.setSuffix(properties.getSuffix());
- resolver.setCache(properties.isCache());
- resolver.setContentType(properties.getContentType());
- resolver.setViewNames(properties.getViewNames());
- resolver.setExposeRequestAttributes(properties.isExposeRequestAttributes());
- resolver.setAllowRequestOverride(properties.isAllowRequestOverride());
- resolver.setExposeSessionAttributes(properties.isExposeSessionAttributes());
- resolver.setExposeSpringMacroHelpers(properties.isExposeSpringMacroHelpers());
- resolver.setRequestContextAttribute(properties.getRequestContextAttribute());
-
- // This resolver acts as a fallback resolver (e.g. like a
- // InternalResourceViewResolver) so it needs to have low precedence
- resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 5);
- }
-
-}
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafAutoConfiguration.java
index 2ee9a77a3aa..540279c3ee3 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafAutoConfiguration.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafAutoConfiguration.java
@@ -50,7 +50,7 @@ import org.thymeleaf.templateresolver.TemplateResolver;
/**
* {@link EnableAutoConfiguration Auto-configuration} for Thymeleaf.
- *
+ *
* @author Dave Syer
* @author Andy Wilkinson
*/
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java
index bb4525a1388..af24278e979 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java
@@ -31,7 +31,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
-import org.springframework.boot.autoconfigure.template.TemplateViewResolverConfigurer;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
@@ -48,7 +47,7 @@ import org.springframework.web.servlet.view.velocity.VelocityViewResolver;
/**
* {@link EnableAutoConfiguration Auto-configuration} for Velocity.
- *
+ *
* @author Andy Wilkinson
* @since 1.1.0
*/
@@ -69,11 +68,9 @@ public class VelocityAutoConfiguration {
if (this.properties.isCheckTemplateLocation()) {
Resource resource = this.resourceLoader.getResource(this.properties
.getResourceLoaderPath());
- Assert.state(
- resource.exists(),
- "Cannot find template location: "
- + resource
- + " (please add some templates, check your Velocity configuration, or set spring.velocity.checkTemplateLocation=false)");
+ Assert.state(resource.exists(), "Cannot find template location: " + resource
+ + " (please add some templates, check your Velocity configuration, "
+ + "or set spring.velocity.checkTemplateLocation=false)");
}
}
@@ -88,6 +85,7 @@ public class VelocityAutoConfiguration {
velocityProperties.putAll(this.properties.getProperties());
factory.setVelocityProperties(velocityProperties);
}
+
}
@Configuration
@@ -127,12 +125,10 @@ public class VelocityAutoConfiguration {
@ConditionalOnMissingBean(name = "velocityViewResolver")
public VelocityViewResolver velocityViewResolver() {
VelocityViewResolver resolver = new VelocityViewResolver();
- new TemplateViewResolverConfigurer().configureTemplateViewResolver(resolver,
- this.properties);
- resolver.setToolboxConfigLocation(this.properties.getToolboxConfigLocation());
- resolver.setDateToolAttribute(this.properties.getDateToolAttribute());
- resolver.setNumberToolAttribute(this.properties.getNumberToolAttribute());
+ this.properties.applyToViewResolver(resolver);
return resolver;
}
+
}
+
}
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java
index 1c9c0450cbd..cfb05572e55 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java
@@ -21,12 +21,12 @@ import java.util.Map;
import org.springframework.boot.autoconfigure.template.AbstractTemplateViewResolverProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.web.servlet.view.velocity.VelocityViewResolver;
/**
* {@link ConfigurationProperties} for configuring Velocity
- *
+ *
* @author Andy Wilkinson
- *
* @since 1.1.0
*/
@ConfigurationProperties(prefix = "spring.velocity")
@@ -91,4 +91,16 @@ public class VelocityProperties extends AbstractTemplateViewResolverProperties {
public void setToolboxConfigLocation(String toolboxConfigLocation) {
this.toolboxConfigLocation = toolboxConfigLocation;
}
+
+ /**
+ * Apply the given properties to a {@link VelocityViewResolver}.
+ * @param resolver the resolver to apply the properties to.
+ */
+ public void applyToViewResolver(VelocityViewResolver resolver) {
+ super.applyToViewResolver(resolver);
+ resolver.setToolboxConfigLocation(getToolboxConfigLocation());
+ resolver.setDateToolAttribute(getDateToolAttribute());
+ resolver.setNumberToolAttribute(getNumberToolAttribute());
+ }
+
}
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java
index 79aa84de469..a16a6965da5 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java
@@ -24,7 +24,7 @@ import org.springframework.util.ClassUtils;
/**
* {@link TemplateAvailabilityProvider} that provides availability information for
* Velocity view templates
- *
+ *
* @author Andy Wilkinson
* @since 1.1.0
*/
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java
index 12ae38c7af5..e25d4afc8b7 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java
@@ -231,7 +231,7 @@ public class BatchAutoConfigurationTests {
public JobRepository getJobRepository() throws Exception {
if (this.jobRepository == null) {
this.factory.afterPropertiesSet();
- this.jobRepository = (JobRepository) this.factory.getObject();
+ this.jobRepository = this.factory.getObject();
}
return this.jobRepository;
}
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfigurationTests.java
index db0168bfb96..ff3dc4d87e7 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfigurationTests.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfigurationTests.java
@@ -16,13 +16,12 @@
package org.springframework.boot.autoconfigure.integration;
-import static org.junit.Assert.*;
-
import org.junit.Test;
-
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.integration.support.channel.HeaderChannelRegistry;
+import static org.junit.Assert.assertNotNull;
+
/**
* @author Artem Bilan
* @since 1.1
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourcePropertiesTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourcePropertiesTests.java
index 08ff2a68ff8..75ee78555fd 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourcePropertiesTests.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourcePropertiesTests.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2012-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.springframework.boot.autoconfigure.jdbc;
import org.junit.Test;
@@ -6,7 +22,7 @@ import static org.junit.Assert.assertEquals;
/**
* Tests for {@link DataSourceProperties}.
- *
+ *
* @author Maciej Walkowiak
*/
public class DataSourcePropertiesTests {
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DriverClassNameProviderTest.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DriverClassNameProviderTest.java
deleted file mode 100644
index b7494b8b291..00000000000
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DriverClassNameProviderTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2012-2014 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.boot.autoconfigure.jdbc;
-
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-/**
- * Tests for {@link DriverClassNameProvider}.
- *
- * @author Maciej Walkowiak
- */
-public class DriverClassNameProviderTest {
- private DriverClassNameProvider driverClassNameProvider = new DriverClassNameProvider();
-
- @Test
- public void testGettingClassNameForKnownDatabase() {
- String driverClassName = driverClassNameProvider.getDriverClassName("jdbc:postgresql://hostname/dbname");
-
- assertEquals("org.postgresql.Driver", driverClassName);
- }
-
- @Test
- public void testReturnsNullForUnknownDatabase() {
- String driverClassName = driverClassNameProvider.getDriverClassName("jdbc:unknowndb://hostname/dbname");
-
- assertNull(driverClassName);
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void testFailureOnNullJdbcUrl() {
- driverClassNameProvider.getDriverClassName(null);
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void testFailureOnMalformedJdbcUrl() {
- driverClassNameProvider.getDriverClassName("malformed:url");
- }
-}
\ No newline at end of file
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DriverClassNameProviderTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DriverClassNameProviderTests.java
new file mode 100644
index 00000000000..913315b4903
--- /dev/null
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DriverClassNameProviderTests.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2012-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.boot.autoconfigure.jdbc;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+/**
+ * Tests for {@link DriverClassNameProvider}.
+ *
+ * @author Maciej Walkowiak
+ */
+public class DriverClassNameProviderTests {
+
+ private DriverClassNameProvider provider = new DriverClassNameProvider();
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ @Test
+ public void classNameForKnownDatabase() {
+ String driverClassName = this.provider
+ .getDriverClassName("jdbc:postgresql://hostname/dbname");
+ assertEquals("org.postgresql.Driver", driverClassName);
+ }
+
+ @Test
+ public void nullForUnknownDatabase() {
+ String driverClassName = this.provider
+ .getDriverClassName("jdbc:unknowndb://hostname/dbname");
+ assertNull(driverClassName);
+ }
+
+ @Test
+ public void failureOnNullJdbcUrl() {
+ this.thrown.expect(IllegalArgumentException.class);
+ this.thrown.expectMessage("JdbcUrl must not be null");
+ this.provider.getDriverClassName(null);
+ }
+
+ @Test
+ public void failureOnMalformedJdbcUrl() {
+ this.thrown.expect(IllegalArgumentException.class);
+ this.thrown.expectMessage("JdbcUrl must start with");
+ this.provider.getDriverClassName("malformed:url");
+ }
+
+}
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryBuilderTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryBuilderTests.java
index 1623978427d..d9c5b1ccf10 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryBuilderTests.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryBuilderTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2013 the original author or authors.
+ * Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,6 +29,8 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
+ * Tests for {@link EntityManagerFactoryBuilder}.
+ *
* @author Dave Syer
*/
public class EntityManagerFactoryBuilderTests {
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfigurationTests.java
index c4682beb05d..f71e6e8cd01 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfigurationTests.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfigurationTests.java
@@ -47,7 +47,7 @@ import static org.junit.Assert.assertThat;
/**
* Tests for {@link VelocityAutoConfiguration}.
- *
+ *
* @author Andy Wilkinson
*/
public class VelocityAutoConfigurationTests {
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProviderTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProviderTests.java
index 1804a6c9872..22a456ba0a0 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProviderTests.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProviderTests.java
@@ -27,7 +27,7 @@ import static org.junit.Assert.assertTrue;
/**
* Tests for {@link VelocityTemplateAvailabilityProvider}.
- *
+ *
* @author Andy Wilkinson
*/
public class VelocityTemplateAvailabilityProviderTests {
diff --git a/spring-boot-cli/samples/beans.groovy b/spring-boot-cli/samples/beans.groovy
index 7a8661dc228..4fbf427876b 100644
--- a/spring-boot-cli/samples/beans.groovy
+++ b/spring-boot-cli/samples/beans.groovy
@@ -1,7 +1,9 @@
@RestController
class Application {
+
@Autowired
String foo
+
@RequestMapping("/")
String home() {
"Hello ${foo}!"
@@ -10,4 +12,4 @@ class Application {
beans {
foo String, "World"
-}
\ No newline at end of file
+}
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java
index e7d59dcce7a..a60d181b5c4 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java
@@ -119,6 +119,7 @@ public class Shell {
private void attachSignalHandler() {
SignalUtils.attachSignalHandler(new Runnable() {
+ @Override
public void run() {
handleSigInt();
}
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AnnotatedNodeASTTransformation.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AnnotatedNodeASTTransformation.java
index 37a8a2e35ef..bf3e4629342 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AnnotatedNodeASTTransformation.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AnnotatedNodeASTTransformation.java
@@ -34,7 +34,7 @@ import org.codehaus.groovy.transform.ASTTransformation;
/**
* A base class for {@link ASTTransformation AST transformations} that are solely
* interested in {@link AnnotatedNode AnnotatedNodes}.
- *
+ *
* @author Andy Wilkinson
* @since 1.1.0
*/
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyAutoConfigurationTransformation.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyAutoConfigurationTransformation.java
index 0be0e86ef3f..71c57488d9d 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyAutoConfigurationTransformation.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyAutoConfigurationTransformation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2013 the original author or authors.
+ * Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ import org.codehaus.groovy.transform.ASTTransformation;
* {@link ASTTransformation} to apply
* {@link CompilerAutoConfiguration#applyDependencies(DependencyCustomizer) dependency
* auto-configuration}.
- *
+ *
* @author Phillip Webb
* @author Dave Syer
* @author Andy Wilkinson
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java
index 401d0a1ff89..188ad47141a 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2013 the original author or authors.
+ * Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ import org.springframework.boot.cli.compiler.dependencies.ArtifactCoordinatesRes
*
* 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
*/
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyResolutionContext.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyResolutionContext.java
index aa6b4950215..ed66789b002 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyResolutionContext.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyResolutionContext.java
@@ -26,6 +26,8 @@ import org.springframework.boot.cli.compiler.grape.ManagedDependenciesFactory;
import org.springframework.boot.dependency.tools.ManagedDependencies;
/**
+ * Context used when resolving dependencies.
+ *
* @author Andy Wilkinson
* @since 1.1.0
*/
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GrabMetadataTransformation.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GrabMetadataTransformation.java
index d7bf66b2a66..2b976a12b04 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GrabMetadataTransformation.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GrabMetadataTransformation.java
@@ -45,7 +45,7 @@ import org.springframework.boot.groovy.GrabMetadata;
/**
* {@link ASTTransformation} for processing {@link GrabMetadata @GrabMetadata}
- *
+ *
* @author Andy Wilkinson
* @since 1.1.0
*/
@@ -78,7 +78,6 @@ public class GrabMetadataTransformation extends AnnotatedNodeASTTransformation {
private void processGrabMetadataAnnotation(AnnotationNode annotationNode) {
Expression valueExpression = annotationNode.getMember("value");
-
List