类 JsonMixinModuleEntries
java.lang.Object
org.springframework.boot.jackson.JsonMixinModuleEntries
Provide the mapping of json mixin class to consider.
- 从以下版本开始:
- 3.0.0
- 作者:
- Stephane Nicoll
-
嵌套类概要
嵌套类 -
方法概要
修饰符和类型方法说明static JsonMixinModuleEntries
create
(Consumer<JsonMixinModuleEntries.Builder> mixins) Create an instance using the specifiedJsonMixinModuleEntries.Builder
.void
doWithEntry
(ClassLoader classLoader, BiConsumer<Class<?>, Class<?>> action) Perform an action on each entry defined by this instance.static JsonMixinModuleEntries
scan
(ApplicationContext context, Collection<String> basePackages) Scan the classpath for@JsonMixin
in the specifiedbasePackages
.
-
方法详细资料
-
create
Create an instance using the specifiedJsonMixinModuleEntries.Builder
.- 参数:
mixins
- a consumer of the builder- 返回:
- an instance with the state of the customized builder.
-
scan
public static JsonMixinModuleEntries scan(ApplicationContext context, Collection<String> basePackages) Scan the classpath for@JsonMixin
in the specifiedbasePackages
.- 参数:
context
- the application context to usebasePackages
- the base packages to consider- 返回:
- an instance with the result of the scanning
-
doWithEntry
Perform an action on each entry defined by this instance. If a class needs to be resolved from its class name, the specifiedClassLoader
is used.- 参数:
classLoader
- the classloader to use to resolve class name if necessaryaction
- the action to invoke on each type to mixin class entry
-