my-spring-boot-experiments
  • README
  • Spring Batch implementation
  • API Example for Archunit
  • spring-boot-chaos-monkey
  • Grafana LGTM Implementation
  • MongoDb for insertion and search using elastic search
  • OpenSearch Implementation
  • spring-boot-rabbitmq-thymeleaf
  • boot-rest-docs-sample
  • boot-strategy-plugin
  • spring-boot-togglz-sample
  • spring-boot-ultimate-redis
  • GraphQL
    • spring-boot-graphql-querydsl
    • GraphQl implementation using webflux
    • GraphQl implementation using webmvc
  • httpClients
    • http-proxy
    • rest-template
    • rest-client
    • web-client-mvc
    • web-client-webflux
  • jmh-benchmark
  • jpa
    • Custom Sequence
    • Hibernate Envers Implementation
    • multiple datasources using Spring Boot
    • spring-boot-hibernate2ndlevelcache-sample
    • JNDI in embedded Tomcat
    • JPA Jooq Marriage
    • JPA locks implementation
    • read-replica-with-spring-boot
    • KeySet Pagination Using Blaze
    • KeySet Pagination Using Data-JPA
    • MultiTenancy using Hibernate in Spring Data JPA
      • multitenancy-db
      • multidatasource-multitenancy
      • Partitioned (Discriminator) Data – the data for each tenant is partitioned by a discriminator value
      • schema
  • open-api-spring-boot
  • r2dbc
    • r2dbc-jooq
    • PostgreSQL JSON and enum column support
    • PostgreSQL Notify and Listen support using reactive spring boot
    • r2dbc-boot
    • reactive-cache
  • scheduler
    • Scheduling using JobRunr
    • Scheduling using Quartz
    • Scheduling using Shedlock distribution
  • Code Of Conduct
Powered by GitBook
On this page
  • Run tests
  • Run locally
  • Useful Links

Was this helpful?

Edit on GitHub

spring-boot-togglz-sample

Previousboot-strategy-pluginNextspring-boot-ultimate-redis

Last updated 4 months ago

Was this helpful?

Demonstrates using the library for feature toggling in a Spring Boot application, enabling features to be turned on/off without redeploys.

The toggle feature in a Spring Boot application is a mechanism that allows the developer to enable or disable certain features of the application without having to restart the entire application. This is useful for testing and debugging purposes, as it allows the developer to quickly enable or disable certain features without having to go through the time-consuming process of restarting the application. The toggle feature can be accessed through the application's configuration files, where the developer can specify which features should be enabled or disabled.

A Feature can be enabled using strategy like date, profile, username, etc. As of now 13 strategies are supported by togglz.

Run tests

./mvnw clean verify

Run locally

docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Useful Links

  • Swagger UI: http://localhost:8080/swagger-ui.html

  • Actuator Endpoint: http://localhost:8080/actuator

  • Prometheus: http://localhost:9090/

  • Grafana: http://localhost:3000/ (admin/admin)

  • Kibana: http://localhost:5601/

  • Togglz Console: http://localhost:8080/togglz-console

Togglz