-
Notifications
You must be signed in to change notification settings - Fork 1
UsingGuiceWithOGNL
Sebastian Hoß edited this page Sep 16, 2013
·
7 revisions
To use Guice together with OGNL, declare the following dependencies
<dependencies>
<dependency>
<groupId>com.github.sebhoss.contract</groupId>
<artifactId>contract-guice</artifactId>
<version>${contracts-version}</version>
</dependency>
<dependency>
<groupId>com.github.sebhoss.contract</groupId>
<artifactId>contract-ognl</artifactId>
<version>${contracts-version}</version>
</dependency>
</dependencies>
then install the provided OGNL module
import com.github.sebhoss.contract.module.DefaultOGNLModule; import com.google.inject.AbstractModule;
public class YourModule extends AbstractModule {
@Override protected void configure() { install(new DefaultOGNLModule());
// .. your bindings }
}
and annotate your business methods as usual. Consult the example project for more details.