error
Caused by: java.lang.NullPointerException: null
at com.mangofactory.swagger.models.property.field.FieldModelPropertyProvider.propertiesForSerialization(FieldModelPropertyProvider.java:54) ~[swagger-models-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.models.property.provider.DefaultModelPropertiesProvider.propertiesForSerialization(DefaultModelPropertiesProvider.java:34) ~[swagger-models-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.models.ModelDependencyProvider.propertiesFor(ModelDependencyProvider.java:119) ~[swagger-models-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.models.ModelDependencyProvider.resolvedPropertiesAndFields(ModelDependencyProvider.java:94) ~[swagger-models-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.models.ModelDependencyProvider.resolvedDependencies(ModelDependencyProvider.java:75) ~[swagger-models-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.models.ModelDependencyProvider.resolvedTypeParameters(ModelDependencyProvider.java:83) ~[swagger-models-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.models.ModelDependencyProvider.resolvedDependencies(ModelDependencyProvider.java:74) ~[swagger-models-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.models.ModelDependencyProvider.dependentModels(ModelDependencyProvider.java:37) ~[swagger-models-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.models.DefaultModelProvider.dependencies(DefaultModelProvider.java:82) ~[swagger-models-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.readers.ApiModelReader.populateDependencies(ApiModelReader.java:215) ~[swagger-springmvc-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.readers.ApiModelReader.execute(ApiModelReader.java:80) ~[swagger-springmvc-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.readers.ApiModelReader.execute(ApiModelReader.java:39) ~[swagger-springmvc-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.core.CommandExecutor.execute(CommandExecutor.java:13) ~[swagger-springmvc-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.scanners.ApiListingScanner.scan(ApiListingScanner.java:100) ~[swagger-springmvc-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.core.SwaggerApiResourceListing.initialize(SwaggerApiResourceListing.java:72) ~[swagger-springmvc-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin.initialize(SwaggerSpringMvcPlugin.java:427) ~[swagger-springmvc-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.plugin.SwaggerPluginAdapter.onApplicationEvent(SwaggerPluginAdapter.java:51) ~[swagger-springmvc-1.0.2.jar:1.0.2]
at com.mangofactory.swagger.plugin.SwaggerPluginAdapter.onApplicationEvent(SwaggerPluginAdapter.java:21) ~[swagger-springmvc-1.0.2.jar:1.0.2]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:380) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:386) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:854) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.cloud.netflix.feign.FeignClientFactory.createContext(FeignClientFactory.java:108) ~[spring-cloud-netflix-core-1.1.0.M2.jar:1.1.0.M2]
at org.springframework.cloud.netflix.feign.FeignClientFactory.getContext(FeignClientFactory.java:75) ~[spring-cloud-netflix-core-1.1.0.M2.jar:1.1.0.M2]
at org.springframework.cloud.netflix.feign.FeignClientFactory.getInstance(FeignClientFactory.java:113) ~[spring-cloud-netflix-core-1.1.0.M2.jar:1.1.0.M2]
at org.springframework.cloud.netflix.feign.FeignClientFactoryBean.getOptional(FeignClientFactoryBean.java:120) ~[spring-cloud-netflix-core-1.1.0.M2.jar:1.1.0.M2]
at org.springframework.cloud.netflix.feign.FeignClientFactoryBean.feign(FeignClientFactoryBean.java:71) ~[spring-cloud-netflix-core-1.1.0.M2.jar:1.1.0.M2]
at org.springframework.cloud.netflix.feign.FeignClientFactoryBean.getObject(FeignClientFactoryBean.java:143) ~[spring-cloud-netflix-core-1.1.0.M2.jar:1.1.0.M2]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
... 40 common frames omitted
fix
@Autowired
public void setSpringSwaggerConfig(SpringSwaggerConfig springSwaggerConfig) {
this.springSwaggerConfig = springSwaggerConfig;
//fix java.lang.NullPointerException com.mangofactory.swagger.models.property.field.FieldModelPropertyProvider.propertiesForSerialization
springSwaggerConfig.jacksonSwaggerSupport();
}
docs
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。