mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Polish
This commit is contained in:
parent
a97bcfe3cd
commit
6431fef91e
@ -109,9 +109,14 @@ public class ConfigurationPropertiesReportEndpoint extends
|
||||
|
||||
protected void configureObjectMapper(ObjectMapper mapper) {
|
||||
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
|
||||
applyCglibFilters(mapper);
|
||||
}
|
||||
|
||||
// configure PropertyFiler to make sure Jackson doesn't process CGLIB generated
|
||||
// bean properties
|
||||
/**
|
||||
* configure PropertyFiler to make sure Jackson doesn't process CGLIB generated bean
|
||||
* properties
|
||||
*/
|
||||
private void applyCglibFilters(ObjectMapper mapper) {
|
||||
mapper.setAnnotationIntrospector(new CglibAnnotationIntrospector());
|
||||
mapper.setFilters(new SimpleFilterProvider().addFilter(CGLIB_FILTER_ID,
|
||||
new CglibBeanPropertyFilter()));
|
||||
@ -161,6 +166,7 @@ public class ConfigurationPropertiesReportEndpoint extends
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -182,6 +188,7 @@ public class ConfigurationPropertiesReportEndpoint extends
|
||||
private boolean include(String name) {
|
||||
return !name.startsWith("$$");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -101,8 +101,8 @@ public class MongoRepositoriesAutoConfiguration {
|
||||
}
|
||||
|
||||
public Mongo mongo() throws UnknownHostException {
|
||||
return this.host != null ? new MongoClient(this.host, this.port)
|
||||
: new MongoClient(new MongoClientURI(this.uri));
|
||||
return (this.host != null ? new MongoClient(this.host, this.port)
|
||||
: new MongoClient(new MongoClientURI(this.uri)));
|
||||
}
|
||||
|
||||
public void setHost(String host) {
|
||||
|
@ -501,7 +501,6 @@ public class SpringApplication {
|
||||
/**
|
||||
* Called to log startup information, subclasses may override to add additional
|
||||
* logging.
|
||||
*
|
||||
* @param isRoot true if this application is the root of a context hierarchy
|
||||
*/
|
||||
protected void logStartupInfo(boolean isRoot) {
|
||||
@ -601,7 +600,6 @@ public class SpringApplication {
|
||||
|
||||
/**
|
||||
* The ResourceLoader that will be used in the ApplicationContext.
|
||||
*
|
||||
* @return the resourceLoader the resource loader that will be used in the
|
||||
* ApplicationContext (or null if the default)
|
||||
*/
|
||||
@ -613,7 +611,6 @@ public class SpringApplication {
|
||||
* Either the ClassLoader that will be used in the ApplicationContext (if
|
||||
* {@link #setResourceLoader(ResourceLoader) resourceLoader} is set, or the context
|
||||
* class loader (if not null), or the loader of the Spring {@link ClassUtils} class.
|
||||
*
|
||||
* @return a ClassLoader (never null)
|
||||
*/
|
||||
public ClassLoader getClassLoader() {
|
||||
@ -739,7 +736,6 @@ public class SpringApplication {
|
||||
|
||||
/**
|
||||
* Convenient alternative to {@link #setDefaultProperties(Map)}.
|
||||
*
|
||||
* @param defaultProperties some {@link Properties}
|
||||
*/
|
||||
public void setDefaultProperties(Properties defaultProperties) {
|
||||
|
Loading…
Reference in New Issue
Block a user