All of the example projects are build using SBT.
An example of the Cake Pattern.
This project shows the use of Contexts and Dependency Injection in Scala. It is not set up to be run directly from SBT and needs to be deployed to a Java EE 6 compliant container like JBoss 7 or a servlet container with CDI implementation like Tomcat + Weld.
After deploying you can see it in action by accessing the CoffeeServlet
at http://host:port/scala-cdi/coffee
.
This project shows the use of Google Guice in Scala. Both in its pure form and with a thin Scala wrapper.
The functionality is demonstrated in the test suite ExampleSuite
that you can run by invoking sbt test
.
This project shows the use of the Spring Framework in Scala.
The it is quite similar to the scala-cdi
project but it can be run directly from SBT using the Jetty plugin by
running sbt console and invoking container:start
. The CoffeeServlet
then can be accessed at
localhost:8080/coffee. You stop the embedded Jetty container by invoking container:stop
.
This (perhaps poorly named) project shows the use of Spring Scala.
It is almost exactly the same as scala-spring
but it uses the functional configuration from the
Spring Scala project.
It can be run directly from SBT using the Jetty plugin by running sbt console and invoking container:start
.
The CoffeeServlet
then can be accessed at localhost:8080/coffee.
You stop the embedded Jetty container by invoking container:stop
.
This project demonstrates the use of SubCut.
You can run it by invoking sbt run
.