1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.aws.spring;
17
18 import org.kuali.common.aws.ec2.api.EC2Service;
19 import org.kuali.common.aws.ec2.impl.DefaultEC2Service;
20 import org.kuali.common.aws.ec2.model.EC2ServiceContext;
21 import org.kuali.common.util.spring.env.EnvironmentService;
22 import org.kuali.common.util.spring.service.SpringServiceConfig;
23 import org.kuali.common.util.wait.WaitService;
24 import org.kuali.common.util.wait.spring.WaitServiceConfig;
25 import org.springframework.beans.factory.annotation.Autowired;
26 import org.springframework.context.annotation.Bean;
27 import org.springframework.context.annotation.Configuration;
28 import org.springframework.context.annotation.Import;
29
30 import com.amazonaws.auth.AWSCredentials;
31
32 @Configuration
33 @Import({ SpringServiceConfig.class, WaitServiceConfig.class })
34 public class AwsServiceConfig {
35
36 @Autowired
37 EnvironmentService env;
38
39 @Autowired
40 WaitService service;
41
42 @Autowired
43 AWSCredentials credentials;
44
45 @Bean
46 public EC2ServiceContext ec2ServiceContext() {
47 return null;
48 }
49
50 @Bean
51 public EC2Service ec2Service() {
52 EC2ServiceContext context = ec2ServiceContext();
53 return new DefaultEC2Service(context, service);
54 }
55
56 }