1 | |
package org.seasar.cubby.examples.guice; |
2 | |
|
3 | |
import org.seasar.cubby.examples.guice.action.HelloAction; |
4 | |
import org.seasar.cubby.examples.guice.action.IndexAction; |
5 | |
import org.seasar.cubby.examples.guice.service.HelloService; |
6 | |
import org.seasar.cubby.examples.guice.service.impl.HelloServiceImpl; |
7 | |
import org.seasar.cubby.plugins.guice.CubbyModule; |
8 | |
import org.seasar.cubby.plugins.guice.FileUploadModule; |
9 | |
|
10 | |
import com.google.inject.AbstractModule; |
11 | |
import com.google.inject.Singleton; |
12 | |
import com.google.inject.servlet.ServletModule; |
13 | |
|
14 | 3 | public class ApplicationModule extends AbstractModule { |
15 | |
|
16 | |
@Override |
17 | |
protected void configure() { |
18 | 3 | install(new ServletModule()); |
19 | 3 | install(new CubbyModule()); |
20 | 3 | install(new FileUploadModule()); |
21 | |
|
22 | 3 | bind(IndexAction.class); |
23 | 3 | bind(HelloAction.class); |
24 | 3 | bind(HelloService.class).to(HelloServiceImpl.class).in(Singleton.class); |
25 | 3 | } |
26 | |
|
27 | |
} |