public class CompositeUriComponentsContributor extends ObjectSE implements UriComponentsContributor
UriComponentsContributor
、およびメソッドの引数値を文字列にフォーマットするために使用する特定の ConversionService
をカプセル化します。コンストラクターと説明 |
---|
CompositeUriComponentsContributor(CollectionSE<?> contributors) UriComponentsContributors または HandlerMethodArgumentResolvers のコレクションからインスタンスを作成します。 |
CompositeUriComponentsContributor(CollectionSE<?> contributors, ConversionService cs) UriComponentsContributors または HandlerMethodArgumentResolvers のコレクションからインスタンスを作成します。 |
CompositeUriComponentsContributor(UriComponentsContributor... contributors) UriComponentsContributors または HandlerMethodArgumentResolvers のコレクションからインスタンスを作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
void | contributeMethodArgument(MethodParameter parameter, ObjectSE value, UriComponentsBuilder builder, MapSE<StringSE, ObjectSE> uriVariables) 構築時に作成された ConversionService を使用するオーバーロードメソッド。 |
void | contributeMethodArgument(MethodParameter parameter, ObjectSE value, UriComponentsBuilder builder, MapSE<StringSE, ObjectSE> uriVariables, ConversionService conversionService) 指定されたメソッド引数を処理し、 UriComponentsBuilder を更新するか、すべての引数が処理された後に URI を展開するために使用する URI 変数でマップに追加します。 |
boolean | hasContributors() |
boolean | supportsParameter(MethodParameter parameter) このコントリビュータが指定されたメソッドパラメーターをサポートするかどうか。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public CompositeUriComponentsContributor(UriComponentsContributor... contributors)
UriComponentsContributors
または HandlerMethodArgumentResolvers
のコレクションからインスタンスを作成します。これらは両方とも同じクラスによって実装される傾向があるため、最も便利なオプションは、RequestMappingHandlerAdapter
で構成済みの HandlerMethodArgumentResolvers
を取得し、それをこのコンストラクターに提供することです。contributors
- UriComponentsContributor
または HandlerMethodArgumentResolvers
のコレクション。public CompositeUriComponentsContributor(CollectionSE<?> contributors)
UriComponentsContributors
または HandlerMethodArgumentResolvers
のコレクションからインスタンスを作成します。これらは両方とも同じクラスによって実装される傾向があるため、最も便利なオプションは、RequestMappingHandlerAdapter
で構成済みの HandlerMethodArgumentResolvers
を取得し、それをこのコンストラクターに提供することです。contributors
- UriComponentsContributor
または HandlerMethodArgumentResolvers
のコレクション。public CompositeUriComponentsContributor(@Nullable CollectionSE<?> contributors, @Nullable ConversionService cs)
UriComponentsContributors
または HandlerMethodArgumentResolvers
のコレクションからインスタンスを作成します。これらの両方が同じクラスによって実装される傾向があるため、最も便利なオプションは、RequestMappingHandlerAdapter
で構成済みの HandlerMethodArgumentResolvers
を取得し、それをこのコンストラクターに提供することです。ConversionService
引数が null
の場合、デフォルトで DefaultFormattingConversionService
が使用されます。
contributors
- UriComponentsContributor
または HandlerMethodArgumentResolvers
のコレクション。cs
- メソッドの引数値を URI に追加する前に文字列としてフォーマットする必要がある場合に使用する ConversionServicepublic boolean hasContributors()
public boolean supportsParameter(MethodParameter parameter)
UriComponentsContributor
UriComponentsContributor
の supportsParameter
public void contributeMethodArgument(MethodParameter parameter, ObjectSE value, UriComponentsBuilder builder, MapSE<StringSE,ObjectSE> uriVariables, ConversionService conversionService)
UriComponentsContributor
UriComponentsBuilder
を更新するか、すべての引数が処理された後に URI を展開するために使用する URI 変数でマップに追加します。UriComponentsContributor
の contributeMethodArgument
parameter
- コントローラーメソッドパラメーター (非 null
)value
- 引数値 (おそらく null
)builder
- 更新するビルダー (非 null
)uriVariables
- URI 変数を追加するマップ (非 null
)conversionService
- 値を文字列としてフォーマットする ConversionServicepublic void contributeMethodArgument(MethodParameter parameter, ObjectSE value, UriComponentsBuilder builder, MapSE<StringSE,ObjectSE> uriVariables)