Commit 6431fef9 authored by Phillip Webb's avatar Phillip Webb

Polish

parent a97bcfe3
...@@ -109,9 +109,14 @@ public class ConfigurationPropertiesReportEndpoint extends ...@@ -109,9 +109,14 @@ public class ConfigurationPropertiesReportEndpoint extends
protected void configureObjectMapper(ObjectMapper mapper) { protected void configureObjectMapper(ObjectMapper mapper) {
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); 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.setAnnotationIntrospector(new CglibAnnotationIntrospector());
mapper.setFilters(new SimpleFilterProvider().addFilter(CGLIB_FILTER_ID, mapper.setFilters(new SimpleFilterProvider().addFilter(CGLIB_FILTER_ID,
new CglibBeanPropertyFilter())); new CglibBeanPropertyFilter()));
...@@ -161,6 +166,7 @@ public class ConfigurationPropertiesReportEndpoint extends ...@@ -161,6 +166,7 @@ public class ConfigurationPropertiesReportEndpoint extends
} }
return id; return id;
} }
} }
/** /**
...@@ -182,6 +188,7 @@ public class ConfigurationPropertiesReportEndpoint extends ...@@ -182,6 +188,7 @@ public class ConfigurationPropertiesReportEndpoint extends
private boolean include(String name) { private boolean include(String name) {
return !name.startsWith("$$"); return !name.startsWith("$$");
} }
} }
} }
...@@ -101,8 +101,8 @@ public class MongoRepositoriesAutoConfiguration { ...@@ -101,8 +101,8 @@ public class MongoRepositoriesAutoConfiguration {
} }
public Mongo mongo() throws UnknownHostException { public Mongo mongo() throws UnknownHostException {
return this.host != null ? new MongoClient(this.host, this.port) return (this.host != null ? new MongoClient(this.host, this.port)
: new MongoClient(new MongoClientURI(this.uri)); : new MongoClient(new MongoClientURI(this.uri)));
} }
public void setHost(String host) { public void setHost(String host) {
......
...@@ -501,7 +501,6 @@ public class SpringApplication { ...@@ -501,7 +501,6 @@ public class SpringApplication {
/** /**
* Called to log startup information, subclasses may override to add additional * Called to log startup information, subclasses may override to add additional
* logging. * logging.
*
* @param isRoot true if this application is the root of a context hierarchy * @param isRoot true if this application is the root of a context hierarchy
*/ */
protected void logStartupInfo(boolean isRoot) { protected void logStartupInfo(boolean isRoot) {
...@@ -601,7 +600,6 @@ public class SpringApplication { ...@@ -601,7 +600,6 @@ public class SpringApplication {
/** /**
* The ResourceLoader that will be used in the ApplicationContext. * The ResourceLoader that will be used in the ApplicationContext.
*
* @return the resourceLoader the resource loader that will be used in the * @return the resourceLoader the resource loader that will be used in the
* ApplicationContext (or null if the default) * ApplicationContext (or null if the default)
*/ */
...@@ -613,7 +611,6 @@ public class SpringApplication { ...@@ -613,7 +611,6 @@ public class SpringApplication {
* Either the ClassLoader that will be used in the ApplicationContext (if * Either the ClassLoader that will be used in the ApplicationContext (if
* {@link #setResourceLoader(ResourceLoader) resourceLoader} is set, or the context * {@link #setResourceLoader(ResourceLoader) resourceLoader} is set, or the context
* class loader (if not null), or the loader of the Spring {@link ClassUtils} class. * class loader (if not null), or the loader of the Spring {@link ClassUtils} class.
*
* @return a ClassLoader (never null) * @return a ClassLoader (never null)
*/ */
public ClassLoader getClassLoader() { public ClassLoader getClassLoader() {
...@@ -739,7 +736,6 @@ public class SpringApplication { ...@@ -739,7 +736,6 @@ public class SpringApplication {
/** /**
* Convenient alternative to {@link #setDefaultProperties(Map)}. * Convenient alternative to {@link #setDefaultProperties(Map)}.
*
* @param defaultProperties some {@link Properties} * @param defaultProperties some {@link Properties}
*/ */
public void setDefaultProperties(Properties defaultProperties) { public void setDefaultProperties(Properties defaultProperties) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment