类 RestAutoConfiguration
java.lang.Object
cn.herodotus.engine.rest.autoconfigure.RestAutoConfiguration
- 所有已实现的接口:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@AutoConfiguration
@EnableConfigurationProperties({cn.herodotus.engine.rest.condition.properties.EndpointProperties.class,cn.herodotus.engine.rest.condition.properties.PlatformProperties.class})
public class RestAutoConfiguration
extends Object
implements org.springframework.context.ApplicationContextAware
Description: Rest 自动注入
RestAutoConfiguration 注入的时机比较早,所以在此进行 ServiceContextHolder 的初始化。
如果在其它地方注入 ServiceContextHolder 因为时机过完,会导致未完成初始化即被使用,出现抛错的问题。- 作者:
- : gengwei.zheng
- Date:
- : 2022/1/19 23:16
-
构造器概要
构造器构造器说明RestAutoConfiguration(cn.herodotus.engine.rest.condition.properties.EndpointProperties endpointProperties, cn.herodotus.engine.rest.condition.properties.PlatformProperties platformProperties, org.springframework.boot.autoconfigure.web.ServerProperties serverProperties) -
方法概要
修饰符和类型方法说明cn.herodotus.engine.assistant.definition.function.ErrorCodeMapperBuilderCustomizervoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer
-
构造器详细资料
-
RestAutoConfiguration
public RestAutoConfiguration(cn.herodotus.engine.rest.condition.properties.EndpointProperties endpointProperties, cn.herodotus.engine.rest.condition.properties.PlatformProperties platformProperties, org.springframework.boot.autoconfigure.web.ServerProperties serverProperties)
-
-
方法详细资料
-
setApplicationContext
public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - 指定者:
setApplicationContext在接口中org.springframework.context.ApplicationContextAware- 抛出:
org.springframework.beans.BeansException
-
xssObjectMapperBuilderCustomizer
@Bean public org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer xssObjectMapperBuilderCustomizer() -
restErrorCodeMapperBuilderCustomizer
@Bean public cn.herodotus.engine.assistant.definition.function.ErrorCodeMapperBuilderCustomizer restErrorCodeMapperBuilderCustomizer()
-