复制Cdoc06Controller 为Cdoc01/02/..../09Controller 并且将文件里面的内容的06全部改为对应的数字01/02.../09
i=1
F=Cdoc
end=Controller
while [ $i -le 9 ]
do
cp -vf Cdoc06Controller.java $F'0'$i$end.java
sed -i 's/06/0'$i'/g' $F'0'$i$end.java
let i+=1
done
对所有文件,在entity这个字的上一行插入一句话@JsonIgnoreProperties\(\{\"handler\"\,\"hibernateLazyInitializer\"\}\)
删掉getWenShuZiLei下的几行
k=1
while [ $k -le 9 ]
do
line=`sed -n '/@Entity/=' Cdoc0${k}.java`
sed -i "${line}i @JsonIgnoreProperties\(\{\"handler\"\,\"hibernateLazyInitializer\"\}\)" ./Cdoc0$k.java
sed -i '/String wenShuRiQi/d' ./Cdoc0$k.java
sed -i '/String wenShuZiLei/d' ./Cdoc0$k.java
sed -i '/@Transient/d' ./Cdoc0$k.java
line=`sed -n '/getWenShuZiLei/=' Cdoc0${k}.java`
line2=line+9
sed -i "${line},${line2}d" ./Cdoc0$k.java
let k+=1
done
全局修改109变为对应的数字
i=1
while [ $i -le 9 ]
do
sed "s/cdocType=\"109\"/cdocType=\"0${i}\"/" ./Cdoc0${i}ServiceImpl.java
let i+=1
done
pid=$(ps aux | grep 'python -m SimpleHTTPServer 8089'| grep -v "grep"|awk '{print $2}')
kill $pid
cd /root/map/front-end/
git pull
cd /root/map/front-end/myreactapp/
npm run build
cd /root/map/front-end/myreactapp/build
nohup python -m SimpleHTTPServer 8089 &
~