This is an automated email from the ASF dual-hosted git repository.
bhliva pushed a commit to branch dlab_refactored
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/dlab_refactored by this push:
new 327f19c DLAB-000 fixed config for prod mode
327f19c is described below
commit 327f19c3f02e9e580f42a3b3c4abd99fbe6acc6f
Author: bhliva <[email protected]>
AuthorDate: Fri Aug 2 12:49:54 2019 +0300
DLAB-000 fixed config for prod mode
---
.../com/epam/dlab/backendapi/modules/ProductionModule.java | 3 ---
.../com/epam/dlab/backendapi/modules/ProductionModule.java | 12 ++++++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
index 94d8229..40744fa 100644
---
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
+++
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
@@ -28,14 +28,12 @@ import
com.epam.dlab.backendapi.core.commands.ICommandExecutor;
import com.epam.dlab.backendapi.core.response.handlers.dao.CallbackHandlerDao;
import
com.epam.dlab.backendapi.core.response.handlers.dao.FileSystemCallbackHandlerDao;
import com.epam.dlab.backendapi.service.CheckInactivityService;
-import com.epam.dlab.backendapi.service.RestoreCallbackHandlerService;
import com.epam.dlab.backendapi.service.ProjectService;
import com.epam.dlab.backendapi.service.RestoreCallbackHandlerService;
import com.epam.dlab.backendapi.service.impl.CheckInactivityServiceImpl;
import com.epam.dlab.backendapi.service.impl.ProjectServiceImpl;
import com.epam.dlab.backendapi.service.impl.RestoreCallbackHandlerServiceImpl;
import com.epam.dlab.constants.ServiceConsts;
-import com.epam.dlab.mongo.MongoService;
import com.epam.dlab.rest.client.RESTService;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -70,7 +68,6 @@ public class ProductionModule extends
ModuleBase<ProvisioningServiceApplicationC
.SELF_SERVICE_NAME));
bind(MetadataHolder.class).to(DockerWarmuper.class);
bind(ICommandExecutor.class).to(CommandExecutor.class).asEagerSingleton();
-
bind(MongoService.class).toInstance(configuration.getMongoFactory().build(environment));
bind(ObjectMapper.class).toInstance(new
ObjectMapper().configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, true));
bind(CallbackHandlerDao.class).to(FileSystemCallbackHandlerDao.class);
bind(RestoreCallbackHandlerService.class).to(RestoreCallbackHandlerServiceImpl.class);
diff --git
a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
index 6bc51c6..44a2a2f 100644
---
a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
+++
b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
@@ -30,7 +30,11 @@ import com.epam.dlab.mongo.MongoService;
import com.epam.dlab.rest.client.RESTService;
import com.google.inject.name.Names;
import io.dropwizard.auth.Authorizer;
+import io.dropwizard.client.JerseyClientBuilder;
import io.dropwizard.setup.Environment;
+import org.glassfish.jersey.logging.LoggingFeature;
+
+import javax.ws.rs.client.Client;
/**
* Production class for an application configuration of SelfService.
@@ -49,6 +53,11 @@ public class ProductionModule extends
ModuleBase<SelfServiceApplicationConfigura
@Override
protected void configure() {
+ final Client httpClient =
+ new JerseyClientBuilder(environment)
+
.using(configuration.getJerseyClientConfiguration())
+ .build("httpClient")
+ .register(new LoggingFeature());
bind(SelfServiceApplicationConfiguration.class).toInstance(configuration);
bind(MongoService.class).toInstance(configuration.getMongoFactory().build(environment));
bind(RESTService.class).annotatedWith(Names.named(ServiceConsts.SECURITY_SERVICE_NAME))
@@ -89,5 +98,8 @@ public class ProductionModule extends
ModuleBase<SelfServiceApplicationConfigura
bind(ProjectService.class).to(ProjectServiceImpl.class);
bind(ProjectDAO.class).to(ProjectDAOImpl.class);
bind(TagService.class).to(TagServiceImpl.class);
+ bind(SecurityService.class).to(SecurityServiceImpl.class);
+ bind(KeycloakService.class).to(KeycloakServiceImpl.class);
+ bind(Client.class).toInstance(httpClient);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]