Browse Source

Polish

pull/7763/head
Johnny Lim 9 years ago committed by Phillip Webb
parent
commit
e12b4a944f
  1. 2
      spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java
  2. 2
      spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpointIntegrationTests.java
  3. 2
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java
  4. 2
      spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java
  5. 10
      spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/AbstractExecutableArchiveLauncherTests.java
  6. 2
      spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/custom-layout.apt
  7. 8
      spring-boot/src/main/java/org/springframework/boot/logging/logback/DefaultLogbackConfiguration.java
  8. 4
      spring-boot/src/main/java/org/springframework/boot/orm/jpa/hibernate/SpringPhysicalNamingStrategy.java
  9. 2
      spring-boot/src/main/java/org/springframework/boot/web/support/SpringBootServletInitializer.java
  10. 3
      spring-boot/src/test/java/org/springframework/boot/yaml/SpringProfileDocumentMatcherTests.java

2
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java

@ -45,7 +45,7 @@ public class ManagementServerProperties implements SecurityPrerequisite { @@ -45,7 +45,7 @@ public class ManagementServerProperties implements SecurityPrerequisite {
/**
* Order applied to the WebSecurityConfigurerAdapter that is used to configure basic
* authentication for management endpoints. If you want to add your own authentication
* for all or some of those endpoints the best thing to do is add your own
* for all or some of those endpoints the best thing to do is to add your own
* WebSecurityConfigurerAdapter with lower order, for instance by using
* {@code ACCESS_OVERRIDE_ORDER}.
*/

2
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpointIntegrationTests.java

@ -47,7 +47,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @@ -47,7 +47,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Integration tests for {@link JolokiaMvcEndpoint}
* Integration tests for {@link JolokiaMvcEndpoint}.
*
* @author Christian Dupuis
* @author Dave Syer

2
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java

@ -48,7 +48,7 @@ public class SecurityProperties implements SecurityPrerequisite { @@ -48,7 +48,7 @@ public class SecurityProperties implements SecurityPrerequisite {
/**
* Order applied to the WebSecurityConfigurerAdapter that is used to configure basic
* authentication for application endpoints. If you want to add your own
* authentication for all or some of those endpoints the best thing to do is add your
* authentication for all or some of those endpoints the best thing to do is to add your
* own WebSecurityConfigurerAdapter with lower order.
*/
public static final int BASIC_AUTH_ORDER = Ordered.LOWEST_PRECEDENCE - 5;

2
spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java

@ -372,7 +372,7 @@ public abstract class MainClassFinder { @@ -372,7 +372,7 @@ public abstract class MainClassFinder {
/**
* Handle the specified main class.
* @param mainClass the mainClass
* @param mainClass the main class
* @return a non-null value if processing should end or {@code null} to continue
*/
T doWith(MainClass mainClass);

10
spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/AbstractExecutableArchiveLauncherTests.java

@ -55,15 +55,15 @@ public class AbstractExecutableArchiveLauncherTests { @@ -55,15 +55,15 @@ public class AbstractExecutableArchiveLauncherTests {
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/"));
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/classes/"));
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/lib/"));
JarEntry webInfLibFoo = new JarEntry(entryPrefix + "/lib/foo.jar");
webInfLibFoo.setMethod(ZipEntry.STORED);
JarEntry libFoo = new JarEntry(entryPrefix + "/lib/foo.jar");
libFoo.setMethod(ZipEntry.STORED);
ByteArrayOutputStream fooJarStream = new ByteArrayOutputStream();
new JarOutputStream(fooJarStream).close();
webInfLibFoo.setSize(fooJarStream.size());
libFoo.setSize(fooJarStream.size());
CRC32 crc32 = new CRC32();
crc32.update(fooJarStream.toByteArray());
webInfLibFoo.setCrc(crc32.getValue());
jarOutputStream.putNextEntry(webInfLibFoo);
libFoo.setCrc(crc32.getValue());
jarOutputStream.putNextEntry(libFoo);
jarOutputStream.write(fooJarStream.toByteArray());
jarOutputStream.close();
return archive;

2
spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/custom-layout.apt

@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
</build>
...
</project>
+---
---
The layout factory is provided as an implementation of <<<LayoutFactory>>> (from
spring-boot-loader-tools) explicitly specified in the pom. If there is only one custom

8
spring-boot/src/main/java/org/springframework/boot/logging/logback/DefaultLogbackConfiguration.java

@ -136,13 +136,13 @@ class DefaultLogbackConfiguration { @@ -136,13 +136,13 @@ class DefaultLogbackConfiguration {
appender.setEncoder(encoder);
config.start(encoder);
appender.setFile(logFile);
getRollingPolicy(appender, config, logFile);
getMaxFileSize(appender, config);
setRollingPolicy(appender, config, logFile);
setMaxFileSize(appender, config);
config.appender("FILE", appender);
return appender;
}
private void getRollingPolicy(RollingFileAppender<ILoggingEvent> appender,
private void setRollingPolicy(RollingFileAppender<ILoggingEvent> appender,
LogbackConfigurator config, String logFile) {
FixedWindowRollingPolicy rollingPolicy = new FixedWindowRollingPolicy();
rollingPolicy.setFileNamePattern(logFile + ".%i");
@ -151,7 +151,7 @@ class DefaultLogbackConfiguration { @@ -151,7 +151,7 @@ class DefaultLogbackConfiguration {
config.start(rollingPolicy);
}
private void getMaxFileSize(RollingFileAppender<ILoggingEvent> appender,
private void setMaxFileSize(RollingFileAppender<ILoggingEvent> appender,
LogbackConfigurator config) {
SizeBasedTriggeringPolicy<ILoggingEvent> triggeringPolicy = new SizeBasedTriggeringPolicy<ILoggingEvent>();
try {

4
spring-boot/src/main/java/org/springframework/boot/orm/jpa/hibernate/SpringPhysicalNamingStrategy.java

@ -77,7 +77,7 @@ public class SpringPhysicalNamingStrategy implements PhysicalNamingStrategy { @@ -77,7 +77,7 @@ public class SpringPhysicalNamingStrategy implements PhysicalNamingStrategy {
}
/**
* Get an the identifier for the specified details. By default his method will return
* Get an the identifier for the specified details. By default this method will return
* an identifier with the name adapted based on the result of
* {@link #isCaseInsensitive(JdbcEnvironment)}
* @param name the name of the identifier
@ -95,7 +95,7 @@ public class SpringPhysicalNamingStrategy implements PhysicalNamingStrategy { @@ -95,7 +95,7 @@ public class SpringPhysicalNamingStrategy implements PhysicalNamingStrategy {
/**
* Specify whether the database is case sensitive.
* @param jdbcEnvironment The JDBC environment which can be used to determine case
* @param jdbcEnvironment the JDBC environment which can be used to determine case
* @return true if the database is case insensitive sensitivity
*/
protected boolean isCaseInsensitive(JdbcEnvironment jdbcEnvironment) {

2
spring-boot/src/main/java/org/springframework/boot/web/support/SpringBootServletInitializer.java

@ -163,7 +163,7 @@ public abstract class SpringBootServletInitializer implements WebApplicationInit @@ -163,7 +163,7 @@ public abstract class SpringBootServletInitializer implements WebApplicationInit
}
/**
* Configure the application. Normally all you would need to do is add sources (e.g.
* Configure the application. Normally all you would need to do is to add sources (e.g.
* config classes) because other settings have sensible defaults. You might choose
* (for instance) to add default command line arguments, or set an active Spring
* profile.

3
spring-boot/src/test/java/org/springframework/boot/yaml/SpringProfileDocumentMatcherTests.java

@ -67,8 +67,7 @@ public class SpringProfileDocumentMatcherTests { @@ -67,8 +67,7 @@ public class SpringProfileDocumentMatcherTests {
@Test
public void matchesCommaSeparatedArray() throws IOException {
DocumentMatcher matcher = new SpringProfileDocumentMatcher("foo", "bar");
Properties properties = getProperties(
String.format("spring.profiles: [bar, spam]"));
Properties properties = getProperties("spring.profiles: [bar, spam]");
assertThat(matcher.matches(properties)).isEqualTo(MatchStatus.FOUND);
}

Loading…
Cancel
Save