Polish
This commit is contained in:
parent
4aac1e3f90
commit
e12b4a944f
|
@ -45,7 +45,7 @@ public class ManagementServerProperties implements SecurityPrerequisite {
|
||||||
/**
|
/**
|
||||||
* Order applied to the WebSecurityConfigurerAdapter that is used to configure basic
|
* Order applied to the WebSecurityConfigurerAdapter that is used to configure basic
|
||||||
* authentication for management endpoints. If you want to add your own authentication
|
* 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
|
* WebSecurityConfigurerAdapter with lower order, for instance by using
|
||||||
* {@code ACCESS_OVERRIDE_ORDER}.
|
* {@code ACCESS_OVERRIDE_ORDER}.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -47,7 +47,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Integration tests for {@link JolokiaMvcEndpoint}
|
* Integration tests for {@link JolokiaMvcEndpoint}.
|
||||||
*
|
*
|
||||||
* @author Christian Dupuis
|
* @author Christian Dupuis
|
||||||
* @author Dave Syer
|
* @author Dave Syer
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class SecurityProperties implements SecurityPrerequisite {
|
||||||
/**
|
/**
|
||||||
* Order applied to the WebSecurityConfigurerAdapter that is used to configure basic
|
* Order applied to the WebSecurityConfigurerAdapter that is used to configure basic
|
||||||
* authentication for application endpoints. If you want to add your own
|
* 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.
|
* own WebSecurityConfigurerAdapter with lower order.
|
||||||
*/
|
*/
|
||||||
public static final int BASIC_AUTH_ORDER = Ordered.LOWEST_PRECEDENCE - 5;
|
public static final int BASIC_AUTH_ORDER = Ordered.LOWEST_PRECEDENCE - 5;
|
||||||
|
|
|
@ -372,7 +372,7 @@ public abstract class MainClassFinder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle the specified main class.
|
* 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
|
* @return a non-null value if processing should end or {@code null} to continue
|
||||||
*/
|
*/
|
||||||
T doWith(MainClass mainClass);
|
T doWith(MainClass mainClass);
|
||||||
|
|
|
@ -55,15 +55,15 @@ public class AbstractExecutableArchiveLauncherTests {
|
||||||
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/"));
|
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/"));
|
||||||
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/classes/"));
|
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/classes/"));
|
||||||
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/lib/"));
|
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/lib/"));
|
||||||
JarEntry webInfLibFoo = new JarEntry(entryPrefix + "/lib/foo.jar");
|
JarEntry libFoo = new JarEntry(entryPrefix + "/lib/foo.jar");
|
||||||
webInfLibFoo.setMethod(ZipEntry.STORED);
|
libFoo.setMethod(ZipEntry.STORED);
|
||||||
ByteArrayOutputStream fooJarStream = new ByteArrayOutputStream();
|
ByteArrayOutputStream fooJarStream = new ByteArrayOutputStream();
|
||||||
new JarOutputStream(fooJarStream).close();
|
new JarOutputStream(fooJarStream).close();
|
||||||
webInfLibFoo.setSize(fooJarStream.size());
|
libFoo.setSize(fooJarStream.size());
|
||||||
CRC32 crc32 = new CRC32();
|
CRC32 crc32 = new CRC32();
|
||||||
crc32.update(fooJarStream.toByteArray());
|
crc32.update(fooJarStream.toByteArray());
|
||||||
webInfLibFoo.setCrc(crc32.getValue());
|
libFoo.setCrc(crc32.getValue());
|
||||||
jarOutputStream.putNextEntry(webInfLibFoo);
|
jarOutputStream.putNextEntry(libFoo);
|
||||||
jarOutputStream.write(fooJarStream.toByteArray());
|
jarOutputStream.write(fooJarStream.toByteArray());
|
||||||
jarOutputStream.close();
|
jarOutputStream.close();
|
||||||
return archive;
|
return archive;
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</build>
|
</build>
|
||||||
...
|
...
|
||||||
</project>
|
</project>
|
||||||
+---
|
---
|
||||||
|
|
||||||
The layout factory is provided as an implementation of <<<LayoutFactory>>> (from
|
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
|
spring-boot-loader-tools) explicitly specified in the pom. If there is only one custom
|
||||||
|
|
|
@ -136,13 +136,13 @@ class DefaultLogbackConfiguration {
|
||||||
appender.setEncoder(encoder);
|
appender.setEncoder(encoder);
|
||||||
config.start(encoder);
|
config.start(encoder);
|
||||||
appender.setFile(logFile);
|
appender.setFile(logFile);
|
||||||
getRollingPolicy(appender, config, logFile);
|
setRollingPolicy(appender, config, logFile);
|
||||||
getMaxFileSize(appender, config);
|
setMaxFileSize(appender, config);
|
||||||
config.appender("FILE", appender);
|
config.appender("FILE", appender);
|
||||||
return appender;
|
return appender;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getRollingPolicy(RollingFileAppender<ILoggingEvent> appender,
|
private void setRollingPolicy(RollingFileAppender<ILoggingEvent> appender,
|
||||||
LogbackConfigurator config, String logFile) {
|
LogbackConfigurator config, String logFile) {
|
||||||
FixedWindowRollingPolicy rollingPolicy = new FixedWindowRollingPolicy();
|
FixedWindowRollingPolicy rollingPolicy = new FixedWindowRollingPolicy();
|
||||||
rollingPolicy.setFileNamePattern(logFile + ".%i");
|
rollingPolicy.setFileNamePattern(logFile + ".%i");
|
||||||
|
@ -151,7 +151,7 @@ class DefaultLogbackConfiguration {
|
||||||
config.start(rollingPolicy);
|
config.start(rollingPolicy);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getMaxFileSize(RollingFileAppender<ILoggingEvent> appender,
|
private void setMaxFileSize(RollingFileAppender<ILoggingEvent> appender,
|
||||||
LogbackConfigurator config) {
|
LogbackConfigurator config) {
|
||||||
SizeBasedTriggeringPolicy<ILoggingEvent> triggeringPolicy = new SizeBasedTriggeringPolicy<ILoggingEvent>();
|
SizeBasedTriggeringPolicy<ILoggingEvent> triggeringPolicy = new SizeBasedTriggeringPolicy<ILoggingEvent>();
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -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
|
* an identifier with the name adapted based on the result of
|
||||||
* {@link #isCaseInsensitive(JdbcEnvironment)}
|
* {@link #isCaseInsensitive(JdbcEnvironment)}
|
||||||
* @param name the name of the identifier
|
* @param name the name of the identifier
|
||||||
|
@ -95,7 +95,7 @@ public class SpringPhysicalNamingStrategy implements PhysicalNamingStrategy {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify whether the database is case sensitive.
|
* 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
|
* @return true if the database is case insensitive sensitivity
|
||||||
*/
|
*/
|
||||||
protected boolean isCaseInsensitive(JdbcEnvironment jdbcEnvironment) {
|
protected boolean isCaseInsensitive(JdbcEnvironment jdbcEnvironment) {
|
||||||
|
|
|
@ -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
|
* config classes) because other settings have sensible defaults. You might choose
|
||||||
* (for instance) to add default command line arguments, or set an active Spring
|
* (for instance) to add default command line arguments, or set an active Spring
|
||||||
* profile.
|
* profile.
|
||||||
|
|
|
@ -67,8 +67,7 @@ public class SpringProfileDocumentMatcherTests {
|
||||||
@Test
|
@Test
|
||||||
public void matchesCommaSeparatedArray() throws IOException {
|
public void matchesCommaSeparatedArray() throws IOException {
|
||||||
DocumentMatcher matcher = new SpringProfileDocumentMatcher("foo", "bar");
|
DocumentMatcher matcher = new SpringProfileDocumentMatcher("foo", "bar");
|
||||||
Properties properties = getProperties(
|
Properties properties = getProperties("spring.profiles: [bar, spam]");
|
||||||
String.format("spring.profiles: [bar, spam]"));
|
|
||||||
assertThat(matcher.matches(properties)).isEqualTo(MatchStatus.FOUND);
|
assertThat(matcher.matches(properties)).isEqualTo(MatchStatus.FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue