- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的 spring-boot+jersey 应用程序已经集成了 togglz。我添加了以下依赖项,如下所示。
// togglz
compile('org.togglz:togglz-servlet:'+togglzVersion)
compile('org.togglz:togglz-cdi:'+togglzVersion)
compile('javax.enterprise:cdi-api:2.0-EDR1')
compile('org.togglz:togglz-spring-web:'+togglzVersion)
compile("org.togglz:togglz-spring-boot-starter:"+togglzVersion)
compile("org.togglz:togglz-console:"+togglzVersion)
compile("org.togglz:togglz-spring-security:"+togglzVersion)
compile("com.github.heneke.thymeleaf:thymeleaf-extras-togglz:1.0.1.RELEASE")
@Bean
public FeatureProvider featureProvider() {
return new EnumBasedFeatureProvider(AppFeatures.class);
}
o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'togglzConsoleServlet' to [/togglz-console/*]
# togglz
togglz:
feature-enums: com.cooltoo.backend.features.AppFeatures # Comma-separated list of fully-qualified feature enum class names.
features:
SMS_CODE: false
console:
enabled: true # Enable admin console.
path: /togglz-console # The path of the admin console when enabled.
最佳答案
第一步 添加以下依赖项:
<!-- Togglz Admin Console -->
<dependency>
<groupId>org.togglz</groupId>
<artifactId>togglz-console</artifactId>
<version>2.3.0.RC1</version>
</dependency>
togglz:
console:
enabled: true # Enable admin console.
togglz.console.enabled: true # Enable admin console.
togglz:
console:
path: /togglz-console # The path of the admin console when enabled.
public class MyTogglzConfiguration implements TogglzConfig {
@Override
public UserProvider getUserProvider() {
return new UserProvider() {
@Override
public FeatureUser getCurrentUser() {
return new SimpleFeatureUser("admin", true);
}
};
}
}
关于spring-boot - 如何在 spring-boot 应用程序中启用 togglz-console,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36352832/
从 2.0.0 版开始,Togglz 提供激活策略来配合功能。例如,您可以连接应启用该功能的服务器 IP 地址列表。然而,这些策略实际上是如何附加到一个特征上的呢?我所看到的只是我可以在 Togglz
我们目前正在尝试实现 Togglz Spring-MVC 中的库。 我们目前通过以下方式从 MyFeatures.java 文件管理代码中的切换: import org.togglz.core.Fea
我有两个应用程序 - api 和 dashboard。这两个应用程序都使用同一数据库中的相同功能。 Togglz 控制台仅在 dashboard 应用程序中处于 Activity 状态。问题是,当我更
我们正在做一个项目,我们想使用一些切换功能工具,如 ff4j 或 togglz,但我们对性能有真正的限制,我的意思是我们真的需要一个执行时间更短的工具,我已经检查了一点 ff4j 和 togglz 但
如果我在单元测试中声明一个 TogglzRule,它必须是公开的,否则会抛出异常:java.lang.Exception: The @Rule 'togglzRule' must be public.
最近几天我一直在使用 togglz。 我试图找出togglez API 中是否有基于注释的方法可用。 我想像下面那样做 - public class Application { public st
如何运行嵌入了 jetty 9 的 togglz。我尝试使用以下代码 ServletHolder togglz = new ServletHolder(TogglzConsoleSer
我们正在使用 Togglz 在我们的项目中打开和关闭功能。以下 TogglzFeature 枚举正在实现 org.togglz.core.Feature 接口(interface) public en
我已将 togglz 实现到我的 Spring Boot 应用程序中。我什至可以访问 Togglz 控制台,并且我已经使用 FeatureManager 测试了这些限制。但是,如果我转到 togglz
我需要检索状态发生更改的 togglz 功能名称。有什么办法可以做到这一点吗?过去 1 天我一直坚持这个问题。非常感谢任何帮助。请在下面找到我的示例代码 public enum MyFeatu
在 Maven 上的 Web 应用程序中安装 togglz 时,我不断收到 IllegalStateException: Could not find the FeatureManager。我完全按照
我正在尝试寻找是否可以在非 Web 应用程序中使用 togglz - 就像我们有纯 Java 项目或 Java 批处理程序一样。 我尝试在独立应用程序中添加 togglz 库并尝试运行它。 这是我的代
我尝试将 togglz 集成到我的 Spring Boot 应用程序中,但是看起来自动配置很难提供 FeatureManager。以下是我的堆栈跟踪: 2017-02-23 16:04:30.033
我正在尝试在 Spring Boot 上运行 Togglz 控制台,但我在屏幕上看到了这个: (type=Forbidden, status=403). You are not allowed to
我是在我们公司第一次配置 togglz JDBCStateRepository。 在我从 InMemoryStateRepository 转换为 JDBCStateRepository 的第一个项目中
我正在尝试使用 @Configuration beans 而不是 XML 来实现 Togglz 和 Spring。我不确定如何配置配置 bean 的返回类型。例如: @Configuration pu
将 Togglz 与我的 Spring MVC 应用程序集成时遇到异常。 异常 java.lang.IllegalStateException: Could not find the FeatureM
我正在尝试将 Togglz 集成到 Spring Boot Web 应用程序中。由于我没有成功使用 Togglz 自动配置(没有创建 FeatureManager bean,因此没有创建 Applic
我的 spring-boot+jersey 应用程序已经集成了 togglz。我添加了以下依赖项,如下所示。 // togglz compile('org.togglz:togglz-servlet:
我们的应用程序当前使用 Togglz。我正在从 FileBasedStateRepository 迁移到 JDBCStateRepository。我正在使用构建器创建JDBCStateReposito
我是一名优秀的程序员,十分优秀!