Skip to content
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Rewrite CDI Integration

This enables CDI support in your service implementations, such as configuration providers, listeners, and more.

Get Started

  1. Include OCPSoft Rewrite in your application's POM file:

  2. Use CDI in your configuration providers or listeners:

    package com.example;
    public class ExampleConfigurationProvider extends HttpConfigurationProvider
         @Inject @My
            private RuleDatabase source;
        public int priority()
                return 10;
        public Configuration getConfiguration(final ServletContext context)
                return ConfigurationBuilder.begin()
                    .setCondition(new DatabaseConditionAdapter(source)) 
                    .setOperation(new DatabaseOperationAdapter(source));
  3. Run your application!


This project is looking for your feedback! What would make your task easier? How can we simplify this experience?


  • Implement CDI value injection support
Something went wrong with that request. Please try again.