Citrus and Spring Configuration
Code completion of Citrus system properties in citrus-application.properties
The Configuration options section of the Citrus documentation, mentions a handful of system properties that can be used to configure and customize Citrus with.
To help the discovery of these properties and their values, the following completions are in place:
- property keys in the
citrus-application.propertieswith short descriptions of their purposes,
- values of the
Additionally, properties not mentioned in the documentation, but available in the
CitrusSettings class are also provided by the completion, although without description for now.
Custom icon for citrus-application.properties in the IDE Project View
As a visual cue for finding the
citrus-application.properties file in the Project View quicker, such file nodes are decorated with a custom icon. It is simply the Citric icon added at the corner of the Properties file icon.
Gutter icon for overridden Citrus Spring beans
Citrus provides extensibility for several validation options via overriding default Spring beans defined in Citrus itself. See:
To help distinguish overridden Citrus-defined Spring beans from others, line markers are added to
@Bean definition methods overriding the aforementioned Citrus-specific beans. The line marker icons are no-op, they are just meant to be a visual aid.
This line marker is disabled by default, because it makes the gutter one column wider which may not be preferred by some.
Override Citrus default bean
In order to simplify the discovery and customization of Citrus specific Spring beans, an action called Override Citrus Spring Bean… is available in editors, in the Alt+Insert and similar Generate menu.
It is available in Spring
@Configuration classes, and it displays the list of bean names whose types are available on the classpath. Upon selection, it generates a
@Bean method with the selected bean name and its associated type.
Generate Citrus Endpoint bean
Citrus ships with many different endpoint implementations that can be created for example as Spring beans for later injection into test classes.
To make the implementation of such endpoint beans easier, an action called Generate Citrus Endpoint Spring Bean… is
available in Spring
It displays the list of endpoint types available on the classpath, and inserts the generated code based on predefined code templates that are available under
File and Code Template /
Code tab. There is a separate code template for each sync and async endpoint, so they can be customized separately if needed.
The action and the code templates are implemented in a way that they can handle the package structure of both Citrus 3.x and 4.x, depending on which one is used in the project.
The generated code is always inserted after the preceding (based on the caret position) method or field, or right at the beginning of the class body.
Currently supported endpoints: