公告结构化
This commit is contained in:
@ -24,6 +24,7 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
import org.apache.commons.lang3.StringEscapeUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -271,6 +272,13 @@ public class WpsController {
|
|||||||
String fileName = fileIdName;
|
String fileName = fileIdName;
|
||||||
String text = " ";
|
String text = " ";
|
||||||
byte buf[] = text.getBytes();
|
byte buf[] = text.getBytes();
|
||||||
|
try {
|
||||||
|
BufferedInputStream bis = new BufferedInputStream(new FileInputStream("text.doc"));
|
||||||
|
buf = IOUtils.toByteArray(bis);
|
||||||
|
}catch (Exception e){
|
||||||
|
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_DATA_OTHER_ERROR.customValidName("模板文件读取异常",true);
|
||||||
|
}
|
||||||
|
|
||||||
String fileLength = String.valueOf(buf.length);
|
String fileLength = String.valueOf(buf.length);
|
||||||
|
|
||||||
if(optional!=null&&optional.get()!=null){
|
if(optional!=null&&optional.get()!=null){
|
||||||
|
BIN
src/main/resources/text.doc
Normal file
BIN
src/main/resources/text.doc
Normal file
Binary file not shown.
Reference in New Issue
Block a user