@@ -43,12 +43,8 @@ public interface Condition {
4343}
4444```
4545
46- `@RequiresSetting` is intended for simple setting-based activation.
47-
48- `@RequiresCondition` is intended for custom logic.
49-
50- A bean whose requirement does not match is not enabled and must not participate in CDI typesafe resolution.
51-
46+ * `@RequiresSetting` is intended for simple setting-based activation.
47+ * `@RequiresCondition` is intended for custom logic.
5248
5349== Sample 1: conditional activation with a custom condition
5450
@@ -222,40 +218,3 @@ Expected output:
222218```
223219Tax for 100: 23.00
224220```
225-
226- == Current sample behavior
227-
228- The sample follows these rules:
229-
230- * `@RequiresCondition` evaluates a custom `Condition`.
231- * `@RequiresSetting` evaluates a named runtime setting.
232- * A non-matching bean is not enabled.
233- * A non-enabled bean does not participate in CDI typesafe resolution.
234- * Conditional annotations do not make a class discoverable as a CDI bean.
235- * The setting resolution strategy belongs to the provider.
236-
237- == Design goal
238-
239- The main design goal is to improve developer experience without breaking CDI’s programming model.
240-
241- Application code should stay simple:
242-
243- [source,java]
244-
245- ```
246- @Inject
247- TaxCalculator taxCalculator;
248- ```
249-
250- Bean implementations should declare when they are active:
251-
252- [source,java]
253-
254- ```
255- @RequiresSetting(name = "app.country", value = "PT")
256- @ApplicationScoped
257- public class PortugalTaxCalculator implements TaxCalculator {
258- }
259- ```
260-
261- The container should handle the activation decision during bootstrap, before typesafe resolution.
0 commit comments