Quarkus Framework提供了一些注入属性值的bean的注释?

发布于 2025-02-12 19:58:08 字数 471 浏览 0 评论 0原文

嗨,大家好,我有疑问,我只是尝试注入或仅在启用属性值时才初始化过滤器请求。

当值es false时,此过滤器将是i拦截请求。

例如,在春季框架中,您可以在这种情况下使用@conditionalonproperty,但是在Quarkus我正在测试whit @ifbuildproperty和@lookupifproperty,但是我的测试中的结果不能像春季功能那样工作。

Quarkus的属性: enable.filter.request = true #false:不过滤或初始化此过滤器

我的引用是: https ://github.com/quarkusio/quarkus/issues/20099

Hi guys I have a doubt I am trying to inject or only initialize filter request only when a property value is enabled.

When the value es false this filter not will be inject o intercept requests.

For example in Spring Framework you ca use @ConditionalOnProperty for this scenario but in Quarkus I am testing whit @IfBuildProperty and @LookupIfProperty but the results in my test not work like Spring features.

Properties of quarkus:
enable.filter.request=true #false: not filter or initialize this filter

My reference is this: https://github.com/quarkusio/quarkus/issues/20099

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文