MarcGiffing / bucket4j-spring-boot-starter

Spring Boot Starter for Bucket4j
Apache License 2.0
298 stars 63 forks source link

Start-up crash when disabled via property #276

Closed nm-mkrueger closed 5 months ago

nm-mkrueger commented 5 months ago

Disabling bucket4j via the property bucket4j.enabled=false results in a missing bean Bucket4JBootProperties and a start-up crash.

It can be reproduced with the example CaffeineApplication

CaffeineApplication - Spring Boot 3.2.3 output

Description:

Parameter 1 of constructor in com.giffing.bucket4j.spring.boot.starter.config.cache.jcache.JCacheBucket4jConfiguration required a bean of type 'com.giffing.bucket4j.spring.boot.starter.context.properties.Bucket4JBootProperties' that could not be found.

The injection point has the following annotations:
    - @jakarta.annotation.Nullable()

Action:

Consider defining a bean of type 'com.giffing.bucket4j.spring.boot.starter.context.properties.Bucket4JBootProperties' in your configuration.

The last working version for us is 0.10.1 Thanks!