This commit is contained in:
Phillip Webb 2016-02-06 14:52:03 -08:00
parent ed01ae9ebf
commit 516afcd2ca
8 changed files with 20 additions and 18 deletions

View File

@ -35,8 +35,11 @@ class Sanitizer {
private Pattern[] keysToSanitize;
Sanitizer() {
setKeysToSanitize("password", "secret", "key", ".*credentials.*",
"vcap_services");
this("password", "secret", "key", ".*credentials.*", "vcap_services");
}
Sanitizer(String... keysToSanitize) {
setKeysToSanitize(keysToSanitize);
}
/**

View File

@ -23,14 +23,14 @@ import org.junit.Test;
import org.springframework.util.MimeTypeUtils;
import static org.hamcrest.Matchers.hasToString;
import static org.junit.Assert.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link AbstractViewResolverProperties}.
*
* @author Stephane Nicoll
*/
public class ViewResolverPropertiesTest {
public class ViewResolverPropertiesTests {
@Test
public void defaultContentType() {

View File

@ -20,14 +20,14 @@ import org.junit.Test;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link ResourceProperties}.
*
* @author Stephane Nicoll
*/
public class ResourcePropertiesTest {
public class ResourcePropertiesTests {
private final ResourceProperties properties = new ResourceProperties();

View File

@ -62,9 +62,9 @@ import static org.junit.Assert.assertEquals;
* @author Phillip Webb
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(HttpTunnelIntegrationTest.Config.class)
@SpringApplicationConfiguration(HttpTunnelIntegrationTests.Config.class)
@WebIntegrationTest
public class HttpTunnelIntegrationTest {
public class HttpTunnelIntegrationTests {
@Autowired
private Config config;

View File

@ -98,7 +98,7 @@ import org.springframework.web.bind.annotation.RestController;
@EnableGlobalMethodSecurity(prePostEnabled = true)
@RestController
public class SampleSecureOAuth2Application {
@RequestMapping("/user")
public Principal user(Principal user) {
return user;

View File

@ -17,8 +17,8 @@
package org.springframework.boot.configurationmetadata;
/**
* An extension of {@link ConfigurationMetadataProperty} that provides a reference to
* its source.
* An extension of {@link ConfigurationMetadataProperty} that provides a reference to its
* source.
*
* @author Stephane Nicoll
* @since 1.3.0

View File

@ -38,10 +38,9 @@ public class BootRunTask extends JavaExec {
/**
* Whether or not resources (typically in {@code src/main/resources} are added
* directly to the classpath. When enabled, this allows live in-place editing
* of resources. Duplicate resources are removed from the resource output
* directory to prevent them from appearing twice if
* {@code ClassLoader.getResources()} is called.
* directly to the classpath. When enabled, this allows live in-place editing of
* resources. Duplicate resources are removed from the resource output directory to
* prevent them from appearing twice if {@code ClassLoader.getResources()} is called.
*/
private boolean addResources = false;

View File

@ -64,9 +64,9 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* 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
* them to appear twice if {@code ClassLoader.getResources()} is called. Please consider
* adding {@code spring-boot-devtools} to your project instead as it provides this feature
* and many more.
* them to appear twice if {@code ClassLoader.getResources()} is called. Please
* consider adding {@code spring-boot-devtools} to your project instead as it provides
* this feature and many more.
* @since 1.0
*/
@Parameter(property = "run.addResources", defaultValue = "false")