CenturyLinkCloud / clc-java-sdk

Apache License 2.0
6 stars 4 forks source link

Spring Adapter #150

Closed pslam closed 9 years ago

pslam commented 9 years ago

We will provide possibilities to inject all our Guice services to Spring managed code.

    @Autowired
    ServerService serverService;

    @Autowired
    GroupService groupService;

    @Autowired
    TemplateService templateService;

    @Autowired
    DataCenterService dataCenterService;

    @Autowired
    CredentialsProvider credentialsProvider;

    @Autowired
    StatisticsService statisticsService;

Bean that customer will need to provide in Spring configuration will be looks like

@Configuration
@EnableClcSdk
class MyConfig {

   @Bean
   public ClcSdk clcSdkConfig() {
      return new ClcSdk(
        /*CredentialsProvider*/ credentialsProvider, /*SdkConfiguration*/ config
      );
   }

}

End-user will need to provide only SDK configuration - results beans will be configuration implicitly by provided in SDK Spring configuration.

It will be possible to add this Spring adapter as separate JAR file.

pslam commented 9 years ago

https://github.com/CenturyLinkCloud/clc-java-sdk/wiki/4.1-Spring-adapter