src/main/java/com/mt/access/application/endpoint/EndpointApplicationService.java
/**
     * refresh proxy when referred role group is updated
     *
     * @param deserialize
     */
refresh proxy when referred role group is updated
@param deserialize
refresh proxy when referred role group is updated @param deserialize
@SubscribeForEvent
    @Transactional
    public void handle(SystemRoleDeleted deserialize) {
        ApplicationServiceRegistry.getApplicationServiceIdempotentWrapper().idempotent(deserialize.getId().toString(), (ignored) -> {
            log.debug("handle role group removed");
            SystemRoleId systemRoleId = new SystemRoleId(deserialize.getDomainId().getDomainId());
            Set<Endpoint> allByQuery = QueryUtility.getAllByQuery((query) -> DomainRegistry.getEndpointRepository().endpointsOfQuery((EndpointQuery) query), new EndpointQuery(systemRoleId));
            if (!allByQuery.isEmpty()) {
                DomainEventPublisher.instance().publish(new EndpointCollectionModified());
                allByQuery.forEach(e -> e.setSystemRoleId(null));
            }
            return null;
        }, ENDPOINT);
    }
@ SubscribeForEvent @ Transactional public void handle ( SystemRoleDeleted deserialize ) { ApplicationServiceRegistry . getApplicationServiceIdempotentWrapper ( ) . idempotent ( deserialize . getId ( ) . toString ( ) , ( ignored ) -> { log . debug ( "handle role group removed" ) ; SystemRoleId systemRoleId = new SystemRoleId ( deserialize . getDomainId ( ) . getDomainId ( ) ) ; Set < Endpoint > allByQuery = QueryUtility . getAllByQuery ( ( query ) -> DomainRegistry . getEndpointRepository ( ) . endpointsOfQuery ( ( EndpointQuery ) query ) , new EndpointQuery ( systemRoleId ) ) ; if ( ! allByQuery . isEmpty ( ) ) { DomainEventPublisher . instance ( ) . publish ( new EndpointCollectionModified ( ) ) ; allByQuery . forEach ( e -> e . setSystemRoleId ( null ) ) ; } return null ; } , ENDPOINT ) ; }
refresh proxy when referred role group is updated
 @param deserialize
refresh proxy when referred role group is updated @param deserialize