This commit is contained in:
baifuyu 2023-12-20 15:42:50 +08:00
parent 396940317a
commit b3456f80c8
2 changed files with 42 additions and 1 deletions

View File

@ -2,7 +2,7 @@
project_name = SupplyChain
description = SupplyChain
namespace = SupplyChain
project_id = 3
project_id = 2
project_dir = supplychain
schema_dir = schema
schema_file = supplychain.schema

View File

@ -0,0 +1,41 @@
/*
* Copyright 2023 Ant Group CO., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied.
*/
package com.antgroup.openspg.server.arks.sofaboot;
import com.antgroup.openspg.server.api.http.client.util.ConnectionInfo;
import com.antgroup.openspg.server.api.http.client.util.HttpClientBootstrap;
import com.antgroup.openspg.server.common.service.config.AppEnvConfig;
import com.antgroup.openspg.server.common.service.spring.SpringContextAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
// todo delete this class
@Service
public class Initialization extends SpringContextAware {
@Autowired private AppEnvConfig appEnvConfig;
@Override
public void init() {
initHttpClientBootstrap();
}
private void initHttpClientBootstrap() {
HttpClientBootstrap.init(
new ConnectionInfo(appEnvConfig.getSchemaUri())
.setConnectTimeout(60000)
.setReadTimeout(60000));
}
}