Skip to content

Commit

Permalink
pref:插件国际化properties文件value值支持引入文件 TencentBlueKing#9366
Browse files Browse the repository at this point in the history
  • Loading branch information
yjieliang committed Sep 20, 2023
1 parent aa42f92 commit 515fd58
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ import com.tencent.devops.common.api.util.OkhttpUtils
import com.tencent.devops.store.utils.AtomReleaseTxtAnalysisUtil
import java.io.File
import java.net.URLEncoder
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service

@Service
class SampleStoreI18nMessageServiceImpl : StoreI18nMessageServiceImpl() {

companion object {
private val logger = LoggerFactory.getLogger(SampleStoreI18nMessageServiceImpl::class.java)
}

override fun getFileStr(
projectCode: String,
fileDir: String,
Expand All @@ -67,6 +72,7 @@ class SampleStoreI18nMessageServiceImpl : StoreI18nMessageServiceImpl() {
) {
val url = client.getServiceUrl(ServiceArchiveAtomResource::class) +
"/service/artifactories/atom/file/content?filePath=${URLEncoder.encode(filePath, "UTF-8")}"
logger.info("downloadFile filePath:$filePath|save path:${file.path}")
val response = OkhttpUtils.doPost(url, "")
if (response.isSuccessful) {
OkhttpUtils.downloadFile(response, file)
Expand Down Expand Up @@ -103,6 +109,7 @@ class SampleStoreI18nMessageServiceImpl : StoreI18nMessageServiceImpl() {
projectCode = projectCode,
fileDir = "$fileDir${separator}file"
) ?: return description
logger.info("descriptionAnalysis get fileNameList:$fileNameList")
val fileDirPath = AtomReleaseTxtAnalysisUtil.buildAtomArchivePath(
userId = userId,
atomDir = fileDir
Expand Down

0 comments on commit 515fd58

Please sign in to comment.