Java 类org.springframework.data.repository.query.spi.EvaluationContextExtensionSupport 实例源码

项目:BikeMan    文件:SecurityConfiguration.java   
/**
 * This allows SpEL support in Spring Data JPA @Query definitions.
 * <p>
 * See https://spring.io/blog/2014/07/15/spel-support-in-spring-data-jpa-query-definitions
 */
@Bean
EvaluationContextExtension securityExtension() {
    return new EvaluationContextExtensionSupport() {
        @Override
        public String getExtensionId() {
            return "security";
        }

        @Override
        public SecurityExpressionRoot getRootObject() {
            return new SecurityExpressionRoot(SecurityContextHolder.getContext().getAuthentication()) {
            };
        }
    };
}
项目:lostodos    文件:SecurityConfiguration.java   
/**
 * This allows SpEL support in Spring Data JPA @Query definitions.
 *
 * See https://spring.io/blog/2014/07/15/spel-support-in-spring-data-jpa-query-definitions
 */
@Bean
EvaluationContextExtension securityExtension() {
    return new EvaluationContextExtensionSupport() {
        @Override
        public String getExtensionId() {
            return "security";
        }

        @Override
        public SecurityExpressionRoot getRootObject() {
            return new SecurityExpressionRoot(SecurityContextHolder.getContext().getAuthentication()) {};
        }
    };
}
项目:jhipster-websocket-example    文件:SecurityConfiguration.java   
/**
 * This allows SpEL support in Spring Data JPA @Query definitions.
 *
 * See https://spring.io/blog/2014/07/15/spel-support-in-spring-data-jpa-query-definitions
 */
@Bean
EvaluationContextExtension securityExtension() {
    return new EvaluationContextExtensionSupport() {
        @Override
        public String getExtensionId() {
            return "security";
        }

        @Override
        public SecurityExpressionRoot getRootObject() {
            return new SecurityExpressionRoot(SecurityContextHolder.getContext().getAuthentication()) {};
        }
    };
}