Configuration
Every property starts with rulii.explorer. Only rulii.explorer.enabled is needed; the rest have defaults.
Properties
Section titled “Properties”| Property | Default | Purpose |
|---|---|---|
rulii.explorer.enabled |
false |
The switch. The endpoint also needs Actuator exposure (management.endpoints.web.exposure.include). |
rulii.explorer.application-name |
spring.application.name |
The name shown in the top bar. |
rulii.explorer.include-sources |
true |
Include file names, line numbers and class names in the descriptor. |
rulii.explorer.ui.enabled |
true |
Serve the page. Set to false to keep the JSON endpoint only. |
rulii.explorer.ui.path |
/rulii |
Where the page is served. |
rulii.explorer.ui.external-sources |
true |
Let the page open another application’s descriptor or a saved file. The browser does the reading; nothing goes through this application. |
rulii.explorer.placeholders.show-values |
never |
always shows the value each ${key:default} placeholder compiled with. |
rulii.explorer.placeholders.exclude |
*password*,*secret*,*token*,*credential*,*private* |
Key patterns whose values stay hidden. Setting it replaces the list. |
rulii.explorer.placeholders.additional-exclude |
Key patterns hidden on top of exclude. |
|
rulii.explorer.beans.enabled |
false |
Describe the beans validated with rulii-bean-validation and show the Beans section. |
rulii.explorer.beans.packages |
the auto-configuration packages | Packages to scan for beans, sub-packages included. |
rulii.explorer.beans.classes |
Classes to describe whether or not the scan finds them. | |
rulii.explorer.beans.include-validated |
true |
Also describe the classes the validator had validated by the time the descriptor was built. |
Placeholder Values
Section titled “Placeholder Values”A placeholder such as ${order.minTotal:100} is always shown as written, with its default. The value the application resolved is not shown unless you opt in:
rulii.explorer.placeholders.show-values=alwaysrulii.explorer.placeholders.additional-exclude=pricing.vipDiscountThe explorer then shows, beside each placeholder, the value the script was compiled with. It is read from the running application, not looked up again.
Some values stay hidden:
- Keys matching
*password*,*secret*,*token*,*credential*or*private*(case-insensitive, matched against the whole key) - Keys matching your own patterns in
additional-exclude - Anything the application’s Actuator
SanitizingFunctionbeans would mask, so a value hidden on theenvendpoint is hidden here too
With rulii.explorer.beans.enabled=true the explorer adds a Beans section beside the Rules section: each validated class with its properties, methods and constructors, their constraints, @Expr expressions and @Validate rules, the rule built for each constraint, and the cascades from bean to bean.
rulii.explorer.beans.enabled=trueThe section needs the application to validate with rulii. From rulii-spring 2.3.0 that is opt-in, so the application declares the library, with Spring Boot’s validation module:
<dependency> <groupId>org.rulii</groupId> <artifactId>rulii-bean-validation</artifactId> <version>1.1.0</version></dependency><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId></dependency>Without rulii-bean-validation, or with rulii.validation.enabled=false, the section stays off. See Bean Validation in Spring Boot.
Beans are found in three ways:
- A scan of the application’s auto-configuration packages, or of
rulii.explorer.beans.packages. The scan reads class files, so no class is loaded that is not a bean. - The classes named in
rulii.explorer.beans.classes. - The classes the validator has already validated, unless
rulii.explorer.beans.include-validated=false.
The Rules section is the same with or without the Beans section.
Adding to What It Understands
Section titled “Adding to What It Understands”An application can declare beans of two types, which run before the explorer’s own:
ExpressionAnalyzer, to describe expressions in another scripting languageProblemCheck, to report problems of your own
Next: Using the Explorer.