Class EntityScanningDataRouteReferenceBeanPostProcessor

  • All Implemented Interfaces:
    org.springframework.beans.factory.config.BeanPostProcessor

    public class EntityScanningDataRouteReferenceBeanPostProcessor
    extends Object
    implements org.springframework.beans.factory.config.BeanPostProcessor
    BeanPostProcessor responsible for detecting JpaEntityScan annotation declarations containing one or more basePackages that do not already belong to a root package defined in JpaDataRoute.routePackage(). If found, the JpaEntityScan.routePackage() will be used to try to match to an available JpaDataRoute. If a match is found, a new PackageDataRouteSupplier is registered with DataRouteReference to handle the non-standard basePackage. This registration facilitates future calls to DataRouteReference.findRouteByExample(String) when passing the non-standard basePackage.
    • Constructor Detail

      • EntityScanningDataRouteReferenceBeanPostProcessor

        public EntityScanningDataRouteReferenceBeanPostProcessor​(List<JpaEntityScanBean> scans)
    • Method Detail

      • postProcessAfterInitialization

        public Object postProcessAfterInitialization​(Object bean,
                                                     String beanName)
                                              throws org.springframework.beans.BeansException
        Specified by:
        postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
        Throws:
        org.springframework.beans.BeansException