-
Notifications
You must be signed in to change notification settings - Fork 1
UsingSpringWithJavaScript
Sebastian Hoß edited this page Oct 1, 2013
·
5 revisions
To use Spring together with JavaScript, declare the following dependencies
<dependencies>
<dependency>
<groupId>com.github.sebhoss.contract</groupId>
<artifactId>contract-spring</artifactId>
<version>${contracts-version}</version>
</dependency>
<dependency>
<groupId>com.github.sebhoss.contract</groupId>
<artifactId>contract-scriptengine</artifactId>
<version>${contracts-version}</version>
</dependency>
</dependencies>
then import the provided JavaScript configuration
import com.github.sebhoss.contract.configuration.DefaultJavaScriptConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import;
@Configuration @Import(DefaultJavaScriptConfiguration.class) public class CompanySpringConfiguration {
// .. your bindings
}
and annotate your business methods as usual. Consult the example project for more details.