Skip to content

Commit

Permalink
feature-toggle - apply on promotion controller
Browse files Browse the repository at this point in the history
  • Loading branch information
chinnawatsut committed Mar 22, 2024
1 parent 8363494 commit 39f8dad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import java.util.List;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1")
@ConditionalOnProperty(
value = "feature.toggle.promotion-api",
havingValue = "true",
matchIfMissing = true)
public class PromotionController {
private PromotionService promotionService;

Expand Down
3 changes: 2 additions & 1 deletion kbazaar/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ spring.sql.init.schema-locations=classpath:sql/schema/*.sql
spring.sql.init.data-locations=classpath:sql/data/*.sql
security.jwt.secret=

#feature.toggle.promotion-api=false
# swagger
springdoc.swagger-ui.enabled=true
springdoc.swagger-ui.enabled=true

0 comments on commit 39f8dad

Please sign in to comment.