如何实现有条件的RepositoryRestResource公开?

时间:2019-05-02 16:58:41

标签: java spring-data spring-data-rest

我想基于Spring Boot应用程序属性有条件地公开带有RepositoryRestResource注释的存储库,该属性具有特定于环境的值。

我希望使用exported = "${myProperty}"之类的东西,但只接受字面的true或false。

我目前知道的唯一解决方案是实现自定义RepositoryDetectionStrategy

有没有一种简单的方法类似于用@Bean注释@ConditionalOnProperty

0 个答案:

没有答案