Rewrite 2.0.7.Final Released – Bug fixes and enhancements
We are glad to announce the latest version of [[Rewrite]], servlet toolkit and URL-rewriting extensions. This release includes serveral bug fixes and enhancements:
Simplified Configuration
We heard you! It is now much easier to register ConfigurationProvider
objects. You can forget about creating a service file, and simply use the convenient @RewriteConfiguration
annotation:
import org.ocpsoft.logging.Logger.Level; import org.ocpsoft.rewrite.annotation.RewriteConfiguration; import org.ocpsoft.rewrite.config.Configuration; import org.ocpsoft.rewrite.config.ConfigurationBuilder; import org.ocpsoft.rewrite.config.Log; import org.ocpsoft.rewrite.servlet.config.HttpConfigurationProvider; @RewriteConfiguration public class ApplicationConfigurationProvider extends HttpConfigurationProvider { @Override public Configuration getConfiguration(ServletContext context) { return ConfigurationBuilder.begin() .addRule() .perform(Log.message(Log.message(Level.INFO, "Rewrite is active."))) ; } @Override public int priority() { return 0; } }
Issues resolved
- https://github.com/ocpsoft/rewrite/issues/123 – Rewrite should have a @RewriteConfiguration annotation for simpler configuration provider registration
- https://github.com/ocpsoft/rewrite/issues/128 – NullPointerException in ResponseContentInterceptor when no output written to ServletResponse
- https://github.com/ocpsoft/rewrite/pull/124 – Extended AddressBuilder to support custom Schemes.
- https://github.com/ocpsoft/rewrite/issues/122 – Bookstore app only works on AS7
- https://github.com/ocpsoft/rewrite/pull/120 – Added check if binding supports retrieval in the method ‘performRetrieval’
Upgrade to 2.0.7.Final
Read the installation guide, or configuration manual.
<dependency> <groupId>org.ocpsoft.rewrite</groupId> <artifactId>rewrite-servlet</artifactId> <version>2.0.7.Final</version> </dependency>