提交 5c93a3bd 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 f1233299
...@@ -38,6 +38,11 @@ ...@@ -38,6 +38,11 @@
git clone -b master $para2 ibzwf/ git clone -b master $para2 ibzwf/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzwf/ cd ibzwf/
mvn clean package -Papi
cd ibzwf-provider/ibzwf-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzwf-provider-api.yaml dev --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-provider-api.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-provider-api.jar
EXPOSE 8081 EXPOSE 40003
ADD ibzwf-provider-api.jar /ibzwf-provider-api.jar ADD ibzwf-provider-api.jar /ibzwf-provider-api.jar
...@@ -3,9 +3,11 @@ services: ...@@ -3,9 +3,11 @@ services:
ibzwf-provider-api: ibzwf-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-provider-api:latest
ports: ports:
- "8081:8081" - "40003:40003"
networks: networks:
- agent_network - agent_network
environment:
SPRING_CLOUD_NACOS_DISCOVERY_IP: 172.16.180.237
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 1
......
server: server:
port: 8081 port: 40003
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ package cn.ibizlab.util.service; ...@@ -3,7 +3,7 @@ package cn.ibizlab.util.service;
import cn.ibizlab.util.domain.FileItem; import cn.ibizlab.util.domain.FileItem;
import cn.ibizlab.util.errors.InternalServerErrorException; import cn.ibizlab.util.errors.InternalServerErrorException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils; import org.springframework.util.DigestUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -29,7 +29,7 @@ public class SimpleFileService implements FileService { ...@@ -29,7 +29,7 @@ public class SimpleFileService implements FileService {
// 获取文件后缀 // 获取文件后缀
String extname="."+getExtensionName(fileName); String extname="."+getExtensionName(fileName);
try { try {
String fileid= DigestUtils.md5Hex(multipartFile.getInputStream()); String fileid= DigestUtils.md5DigestAsHex(multipartFile.getInputStream());
String fileFullPath = this.fileRoot+"ibizutil"+File.separator+fileid+File.separator+fileName; String fileFullPath = this.fileRoot+"ibizutil"+File.separator+fileid+File.separator+fileName;
File file = new File(fileFullPath); File file = new File(fileFullPath);
File parent = new File(file.getParent()); File parent = new File(file.getParent());
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册