Configuration Reference
This page collects every configuration property, bean name constant, and auto-configured bean in one place for quick reference.
Application Properties
Section titled “Application Properties”| Property | Default | Description |
|---|---|---|
| rulii.converters.registerDefaults | true | Register rulii’s built-in type converters. Set to false to use only custom converters. (Key corrected from rulii.converts.* in 2.0.0.) |
| rulii.scripts.resolvePlaceholders | true | Resolve ${property:default} environment placeholders inside script text at startup. New in 2.0.0. |
| rulii.executor.awaitTerminationSeconds | 10 | Seconds the rulii.executorService pool waits for running and queued rules when the context closes, before interrupting what is left. New in 2.1.0. |
| rulii.validation.enabled | true when rulii-bean-validation is on the classpath | With the rulii-bean-validation dependency added, rulii is the application’s Bean Validation provider (BeanValidationConfig). Set to false to turn that off while the dependency stays: the Validator bean is pinned to Hibernate Validator when it is on the classpath (HibernateValidatorConfig). Without the dependency the property has no effect. (new in 2.2.0; opt-in since 2.3.0) |
| rulii.validation.failFast | false | Stop bean validation at the first violation. Passed to the rulii provider’s configuration. (new in 2.2.0) |
| rulii.script.defaultLanguage | — | The scripting language a script is compiled in when none is named (@Expr, Script.builder().build(text)). Read from the Spring Environment into the ScriptProcessorManager, as the system property of the same name is. No default: without it a script that names no language fails to compile. (new in 2.2.0) |
Bean Name Constants
Section titled “Bean Name Constants”The BeanNames class defines the internal bean names used by rulii-spring. Use these constants when you need to reference beans by name (e.g., in @Qualifier annotations).
| Constant | Value | Bean Type |
|---|---|---|
| OBJECT_FACTORY_NAME | “rulii.objectFactory” | ObjectFactory |
| SPRING_CONVERTER_REGISTRY | “rulii.converterRegistry” | ConverterRegistry |
| RULE_REGISTRY | “rulii.ruleRegistry” | RuleRegistry |
| SCRIPT_MANAGER | “rulii.scriptManager” | ScriptProcessorManager |
| TRACER | “rulii.tracer” | Tracer |
| EXECUTOR_SERVICE | “rulii.executorService” | ExecutorService (async rules & flows; overridden by name) |
| BeanValidationConfig.VALIDATOR_BEAN_NAME | “defaultValidator” | LocalValidatorFactoryBean (the bean name Boot’s validation auto-configuration uses) (new in 2.2.0) |
Auto-Configured Beans
Section titled “Auto-Configured Beans”All beans are defined in RuleConfig and can be overridden by declaring your own @Bean of the same type. The last two rows come from BeanValidationConfig (new in 2.2.0; see Auto-Configuration).
| Bean Type | Default Implementation | Named Bean? |
|---|---|---|
| BindingMatchingStrategy | Default (builder) | No |
| ParameterResolver | Default (builder) | No |
| MessageResolver | SpringEnvironmentMessageResolver | No |
| MessageFormatter | Default (builder) | No |
| ObjectFactory | SpringObjectFactory | rulii.objectFactory |
| ConverterRegistry | Default + SpringConverterAdapter | rulii.converterRegistry |
| RuleRegistry | SpringRuleRegistry | rulii.ruleRegistry |
| RuleContextOptions | SpringEnabledRuleContextOptions | No |
| RuleBeanDefinitionRegistryPostProcessor | Fallback scanner | No |
| Validator (new in 2.2.0) | LocalValidatorFactoryBean pinned to RuliiValidationProvider (or HibernateValidator when opted out) | defaultValidator |
| BeanValidator (new in 2.2.0) | The Validator bean unwrapped to rulii’s BeanValidator | No |
Bean Dependency Diagram
Section titled “Bean Dependency Diagram”The following shows how the auto-configured beans relate to each other:
RuleContextOptions ├── BindingMatchingStrategy ├── ParameterResolver ├── MessageFormatter ├── MessageResolver │ └── SpringEnvironmentMessageResolver │ └── Environment ├── ObjectFactory │ └── SpringObjectFactory │ └── AutowireCapableBeanFactory └── ConverterRegistry ├── Default converters (if registerDefaults=true) ├── Custom Converter beans └── SpringConverterAdapter └── ConversionService
RuleRegistry └── SpringRuleRegistry └── ListableBeanFactory
RuleBeanDefinitionRegistryPostProcessor (fallback, if no @RuleScan) └── AutoConfigurationPackagesCustomizing a Bean
Section titled “Customizing a Bean”To override any auto-configured bean, declare your own with the matching type. For example, to customize the RuleContextOptions:
@Configurationpublic class CustomRuleConfig {
@Bean public RuleContextOptions ruleContextOptions( BindingMatchingStrategy matchingStrategy, ParameterResolver parameterResolver, MessageFormatter messageFormatter, ConverterRegistry converterRegistry, ObjectFactory objectFactory, MessageResolver messageResolver) { return new SpringEnabledRuleContextOptions( matchingStrategy, parameterResolver, messageFormatter, converterRegistry, objectFactory, messageResolver, Executors.newVirtualThreadPerTaskExecutor(), // virtual threads! Clock.systemUTC(), // UTC clock Locale.ENGLISH); // fixed locale }}Package Structure
Section titled “Package Structure”org.rulii.spring├── annotation│ └── RuleScan├── bind.load│ └── SpringContextBindingLoader├── config│ ├── BeanNames│ ├── RuleConfig│ ├── RuleBeanBuilder│ ├── RuleBeanDefinitionRegistryPostProcessor│ ├── RuleBeanDefinitionScanner│ ├── RuleRegistrar│ └── RuleRegistrarMetaInfo├── context│ └── SpringEnabledRuleContextOptions├── convert│ ├── ResolvableTypeDescriptor│ └── SpringConverterAdapter├── factory│ └── SpringObjectFactory├── registry│ └── SpringRuleRegistry├── text│ └── SpringEnvironmentMessageResolver└── validation (new in 2.2.0) ├── BeanValidationConfig ├── HibernateValidatorConfig (BeanValidationOptOutConfig in 2.2.0) └── JpaValidationConfig (new in 2.3.0)