接口的使用
cn.taketoday.web.accept.ContentNegotiationStrategy
程序包
说明
This package contains classes used to determine the requested the media types in a request.
-
cn.taketoday.web.accept中ContentNegotiationStrategy的使用
修饰符和类型类说明classBase class forContentNegotiationStrategyimplementations with the steps to resolve a request to media types.classCentral class to determine requested media types for a request.classAContentNegotiationStrategythat returns a fixed content type.classAContentNegotiationStrategythat checks the 'Accept' request header.classStrategy that resolves the requested content type from a query parameter.classAContentNegotiationStrategythat resolves the file extension in the request path to a key to be used to look up a media type.修饰符和类型字段说明private ContentNegotiationStrategyContentNegotiationManagerFactoryBean.defaultNegotiationStrategy修饰符和类型字段说明private final ArrayList<ContentNegotiationStrategy>ContentNegotiationManager.strategiesprivate List<ContentNegotiationStrategy>ContentNegotiationManagerFactoryBean.strategies修饰符和类型方法说明<T extends ContentNegotiationStrategy>
TContentNegotiationManager.getStrategy(Class<T> strategyType) Find aContentNegotiationStrategyof the given type.返回变量类型为ContentNegotiationStrategy的类型的cn.taketoday.web.accept中的方法修饰符和类型方法说明ContentNegotiationManager.getStrategies()Return the configured content negotiation strategies.修饰符和类型方法说明voidContentNegotiationManagerFactoryBean.setDefaultContentTypeStrategy(ContentNegotiationStrategy strategy) Set a customContentNegotiationStrategyto use to determine the content type to use when no content type is requested.类型变量类型为ContentNegotiationStrategy的cn.taketoday.web.accept中的方法参数修饰符和类型方法说明voidContentNegotiationManagerFactoryBean.setStrategies(List<ContentNegotiationStrategy> strategies) Set the exact list of strategies to use.限定符构造器说明ContentNegotiationManager(ContentNegotiationStrategy... strategies) Create an instance with the given list ofContentNegotiationStrategystrategies each of which may also be an instance ofMediaTypeFileExtensionResolver.类型变量类型为ContentNegotiationStrategy的cn.taketoday.web.accept中的构造器参数限定符构造器说明A collection-based alternative toContentNegotiationManager(ContentNegotiationStrategy...). -
cn.taketoday.web.config中ContentNegotiationStrategy的使用
修饰符和类型方法说明ContentNegotiationConfigurer.defaultContentTypeStrategy(ContentNegotiationStrategy defaultStrategy) Set a customContentNegotiationStrategyto use to determine the content type to use when no content type is requested.类型变量类型为ContentNegotiationStrategy的cn.taketoday.web.config中的方法参数修饰符和类型方法说明voidContentNegotiationConfigurer.strategies(List<ContentNegotiationStrategy> strategies) Set the exact list of strategies to use.