Commit 516afcd2 authored by Phillip Webb's avatar Phillip Webb

Polish

parent ed01ae9e
...@@ -35,8 +35,11 @@ class Sanitizer { ...@@ -35,8 +35,11 @@ class Sanitizer {
private Pattern[] keysToSanitize; private Pattern[] keysToSanitize;
Sanitizer() { Sanitizer() {
setKeysToSanitize("password", "secret", "key", ".*credentials.*", this("password", "secret", "key", ".*credentials.*", "vcap_services");
"vcap_services"); }
Sanitizer(String... keysToSanitize) {
setKeysToSanitize(keysToSanitize);
} }
/** /**
......
...@@ -23,14 +23,14 @@ import org.junit.Test; ...@@ -23,14 +23,14 @@ import org.junit.Test;
import org.springframework.util.MimeTypeUtils; import org.springframework.util.MimeTypeUtils;
import static org.hamcrest.Matchers.hasToString; import static org.hamcrest.Matchers.hasToString;
import static org.junit.Assert.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Tests for {@link AbstractViewResolverProperties}. * Tests for {@link AbstractViewResolverProperties}.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
public class ViewResolverPropertiesTest { public class ViewResolverPropertiesTests {
@Test @Test
public void defaultContentType() { public void defaultContentType() {
......
...@@ -20,14 +20,14 @@ import org.junit.Test; ...@@ -20,14 +20,14 @@ import org.junit.Test;
import static org.hamcrest.CoreMatchers.nullValue; import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Tests for {@link ResourceProperties}. * Tests for {@link ResourceProperties}.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
public class ResourcePropertiesTest { public class ResourcePropertiesTests {
private final ResourceProperties properties = new ResourceProperties(); private final ResourceProperties properties = new ResourceProperties();
......
...@@ -62,9 +62,9 @@ import static org.junit.Assert.assertEquals; ...@@ -62,9 +62,9 @@ import static org.junit.Assert.assertEquals;
* @author Phillip Webb * @author Phillip Webb
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(HttpTunnelIntegrationTest.Config.class) @SpringApplicationConfiguration(HttpTunnelIntegrationTests.Config.class)
@WebIntegrationTest @WebIntegrationTest
public class HttpTunnelIntegrationTest { public class HttpTunnelIntegrationTests {
@Autowired @Autowired
private Config config; private Config config;
......
...@@ -98,7 +98,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -98,7 +98,7 @@ import org.springframework.web.bind.annotation.RestController;
@EnableGlobalMethodSecurity(prePostEnabled = true) @EnableGlobalMethodSecurity(prePostEnabled = true)
@RestController @RestController
public class SampleSecureOAuth2Application { public class SampleSecureOAuth2Application {
@RequestMapping("/user") @RequestMapping("/user")
public Principal user(Principal user) { public Principal user(Principal user) {
return user; return user;
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
package org.springframework.boot.configurationmetadata; package org.springframework.boot.configurationmetadata;
/** /**
* An extension of {@link ConfigurationMetadataProperty} that provides a reference to * An extension of {@link ConfigurationMetadataProperty} that provides a reference to its
* its source. * source.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.3.0 * @since 1.3.0
......
...@@ -38,10 +38,9 @@ public class BootRunTask extends JavaExec { ...@@ -38,10 +38,9 @@ public class BootRunTask extends JavaExec {
/** /**
* Whether or not resources (typically in {@code src/main/resources} are added * Whether or not resources (typically in {@code src/main/resources} are added
* directly to the classpath. When enabled, this allows live in-place editing * directly to the classpath. When enabled, this allows live in-place editing of
* of resources. Duplicate resources are removed from the resource output * resources. Duplicate resources are removed from the resource output directory to
* directory to prevent them from appearing twice if * prevent them from appearing twice if {@code ClassLoader.getResources()} is called.
* {@code ClassLoader.getResources()} is called.
*/ */
private boolean addResources = false; private boolean addResources = false;
......
...@@ -64,9 +64,9 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { ...@@ -64,9 +64,9 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/** /**
* Add maven resources to the classpath directly, this allows live in-place editing of * Add maven resources to the classpath directly, this allows live in-place editing of
* resources. Duplicate resources are removed from {@code target/classes} to prevent * resources. Duplicate resources are removed from {@code target/classes} to prevent
* them to appear twice if {@code ClassLoader.getResources()} is called. Please consider * them to appear twice if {@code ClassLoader.getResources()} is called. Please
* adding {@code spring-boot-devtools} to your project instead as it provides this feature * consider adding {@code spring-boot-devtools} to your project instead as it provides
* and many more. * this feature and many more.
* @since 1.0 * @since 1.0
*/ */
@Parameter(property = "run.addResources", defaultValue = "false") @Parameter(property = "run.addResources", defaultValue = "false")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment