dropwizard-protobuf
is a Jersey JAX-RS Entity Provider that allows reading and writing messages in Google's Protocol Buffers format.
Just add the ProtocolBufferMessageBodyProvider
to your Dropwizard application inside the Application#run
method.
@Override
public void run(HelloWorldConfiguration config, Environment environment) throws Exception {
environment.jersey().register(new ProtocolBufferMessageBodyProvider());
environment.jersey().register(new InvalidProtocolBufferExceptionMapper());
}
This project is available on Maven Central. To add it to your project simply add the following dependencies to your pom.xml
:
<dependency>
<groupId>io.dropwizard.modules</groupId>
<artifactId>dropwizard-protobuf</artifactId>
<version>0.7.1-2</version>
</dependency>
Please file bug reports and feature requests in GitHub issues.
Copyright (c) 2014 Justin Plock
This library is licensed under the Apache License, Version 2.0.
See http://www.apache.org/licenses/LICENSE-2.0.html or the LICENSE file in this repository for the full license text.