mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish
This commit is contained in:
parent
afd357f45a
commit
0cf6efca4f
@ -131,4 +131,5 @@ public class MailProperties {
|
||||
public void setTestConnection(boolean testConnection) {
|
||||
this.testConnection = testConnection;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure.mail;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.activation.MimeType;
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.mail.MessagingException;
|
||||
@ -120,8 +121,8 @@ public class MailSenderAutoConfiguration {
|
||||
}
|
||||
|
||||
/**
|
||||
* Condition to trigger the creation of a {@link JavaMailSenderImpl}. This kicks in if
|
||||
* either the host or jndi name property is set.
|
||||
* Condition to trigger the creation of a {@link JavaMailSenderImpl}. This kicks
|
||||
* in if either the host or jndi name property is set.
|
||||
*/
|
||||
static class MailSenderCondition extends AnyNestedCondition {
|
||||
|
||||
@ -161,6 +162,7 @@ public class MailSenderAutoConfiguration {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
package org.springframework.boot.autoconfigure.mail;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.Session;
|
||||
import javax.naming.Context;
|
||||
@ -237,5 +238,4 @@ public class MailSenderAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
||||
* @author Greg Turnquist
|
||||
* @author Dave Syer
|
||||
*/
|
||||
public class SpringSecurityOAuth2AutoConfigurationTests {
|
||||
public class OAuth2AutoConfigurationTests {
|
||||
|
||||
private static final Class<?> RESOURCE_SERVER_CONFIG = OAuth2ResourceServerConfiguration.class;
|
||||
|
@ -367,7 +367,6 @@ The table below summarizes the list of supported providers:
|
||||
|
||||
|===
|
||||
|
||||
|
||||
TIP: No more than one provider can be active for a given property but you can specify
|
||||
several providers if they can all manage the property _in some ways_. Make sure to place
|
||||
the most powerful provider first as the IDE must use the first one in the JSON section it
|
||||
@ -600,6 +599,8 @@ NOTE: The binder is not aware of the meta-data so if you provide that hint, you
|
||||
will still need to transform the bean name into an actual Bean reference using
|
||||
the `ApplicationContext`.
|
||||
|
||||
|
||||
|
||||
===== Spring profile name
|
||||
The **spring-profile-name** provider auto-completes the Spring profiles that are
|
||||
defined in the configuration of the current project.
|
||||
|
@ -356,8 +356,8 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
|
||||
catch (FileNotFoundException ex) {
|
||||
// No additional metadata
|
||||
}
|
||||
catch (InvalidConfigurationMetadataException e) {
|
||||
log(e.getKind(), e.getMessage());
|
||||
catch (InvalidConfigurationMetadataException ex) {
|
||||
log(ex.getKind(), ex.getMessage());
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logWarning("Unable to merge additional metadata");
|
||||
|
@ -21,13 +21,13 @@ import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import javax.annotation.processing.ProcessingEnvironment;
|
||||
import javax.tools.Diagnostic;
|
||||
import javax.tools.FileObject;
|
||||
import javax.tools.StandardLocation;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
||||
import org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata;
|
||||
import org.springframework.boot.configurationprocessor.metadata.InvalidConfigurationMetadataException;
|
||||
import org.springframework.boot.configurationprocessor.metadata.JsonMarshaller;
|
||||
@ -87,8 +87,9 @@ public class MetadataStore {
|
||||
return null;
|
||||
}
|
||||
catch (JSONException ex) {
|
||||
throw new InvalidConfigurationMetadataException("Invalid additional meta-data in '" +
|
||||
METADATA_PATH + "': " + ex.getMessage(), Diagnostic.Kind.ERROR);
|
||||
throw new InvalidConfigurationMetadataException(
|
||||
"Invalid additional meta-data in '" + METADATA_PATH + "': "
|
||||
+ ex.getMessage(), Diagnostic.Kind.ERROR);
|
||||
}
|
||||
finally {
|
||||
in.close();
|
||||
|
@ -19,8 +19,8 @@ package org.springframework.boot.configurationprocessor.metadata;
|
||||
import javax.tools.Diagnostic;
|
||||
|
||||
/**
|
||||
* Thrown to indicate that some meta-data is invalid. Define the
|
||||
* severity to determine whether it has to fail the build.
|
||||
* Thrown to indicate that some meta-data is invalid. Define the severity to determine
|
||||
* whether it has to fail the build.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 1.3.0
|
||||
@ -36,7 +36,7 @@ public class InvalidConfigurationMetadataException extends RuntimeException {
|
||||
}
|
||||
|
||||
public Diagnostic.Kind getKind() {
|
||||
return kind;
|
||||
return this.kind;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -356,8 +356,8 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
||||
File additionalMetadataFile = createAdditionalMetadataFile();
|
||||
FileCopyUtils.copy("Hello World", new FileWriter(additionalMetadataFile));
|
||||
|
||||
thrown.expect(IllegalStateException.class);
|
||||
thrown.expectMessage("Compilation failed");
|
||||
this.thrown.expect(IllegalStateException.class);
|
||||
this.thrown.expectMessage("Compilation failed");
|
||||
compile(SimpleProperties.class);
|
||||
}
|
||||
|
||||
|
@ -208,8 +208,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
|
||||
}
|
||||
else if (!source.equals(target)) {
|
||||
this.project.getArtifact().setFile(target);
|
||||
getLog().info(
|
||||
"Replacing main artifact " + source + " to " +target);
|
||||
getLog().info("Replacing main artifact " + source + " to " + target);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user