Interface SecurityHintsRegistrar
- All Known Implementing Classes:
AuthorizeReturnObjectCoreHintsRegistrar
,AuthorizeReturnObjectDataHintsRegistrar
,AuthorizeReturnObjectHintsRegistrar
,PrePostAuthorizeExpressionBeanHintsRegistrar
,PrePostAuthorizeHintsRegistrar
public interface SecurityHintsRegistrar
An interface for registering AOT hints.
This interface is helpful because it allows for basing hints on Spring Security's infrastructural beans like so:
@Bean @Role(BeanDefinition.ROLE_INFRASTRUCTURE) static SecurityHintsRegistrar proxyThese(AuthorizationProxyFactory proxyFactory) { return new AuthorizationProxyFactoryHintsRegistrar(proxyFactory, MyClass.class); }
The collection of beans that implement SecurityHintsRegistrar
are serially
invoked by SecurityHintsAotProcessor
, a
BeanFactoryInitializationAotProcessor
.
Since this is used in a
BeanFactoryInitializationAotProcessor
,
the Spring Framework recommendation to only depend on infrastructural beans applies.
If you do not need Security's infrastructural beans, consider either implementing
RuntimeHintsRegistrar
or another AOT component as
indicated in the Spring Framework AOT reference documentation.
- Since:
- 6.4
- See Also:
-
AuthorizeReturnObjectHintsRegistrar
SecurityHintsAotProcessor
-
Method Summary
Modifier and TypeMethodDescriptionvoid
registerHints
(org.springframework.aot.hint.RuntimeHints hints, org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) Register hints after preparing them through Security's infrastructural beans
-
Method Details
-
registerHints
void registerHints(org.springframework.aot.hint.RuntimeHints hints, org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) Register hints after preparing them through Security's infrastructural beans- Parameters:
hints
- the registration target for any AOT hintsbeanFactory
- the bean factory
-