Commit 56101d03 by hulei

修正resteasy依赖

parent 490d8548
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
<groupId>javax.validation</groupId> <groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId> <artifactId>validation-api</artifactId>
</dependency> </dependency>
<!-- <dependency>-->
<!-- <groupId>io.springfox</groupId>-->
<!-- <artifactId>springfox-boot-starter</artifactId>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<dependency> <dependency>
<groupId>io.springfox</groupId> <groupId>io.swagger</groupId>
<artifactId>springfox-boot-starter</artifactId> <artifactId>swagger-annotations</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
...@@ -65,10 +69,10 @@ ...@@ -65,10 +69,10 @@
<groupId>org.freemarker</groupId> <groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId> <artifactId>freemarker</artifactId>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>io.github.openfeign</groupId> <!-- <groupId>io.github.openfeign</groupId>-->
<artifactId>feign-jaxrs</artifactId> <!-- <artifactId>feign-jaxrs</artifactId>-->
</dependency> <!-- </dependency>-->
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId> <artifactId>jackson-annotations</artifactId>
......
package com.brilliance.isc.utils; package com.brilliance.isc.utils;
import cn.hutool.core.codec.Base64; import cn.hutool.core.codec.Base64;
import org.apache.http.util.TextUtils;
import org.apache.poi.util.IOUtils; import org.apache.poi.util.IOUtils;
import java.io.*; import java.io.*;
...@@ -90,7 +89,7 @@ public class ImageUtils ...@@ -90,7 +89,7 @@ public class ImageUtils
* @return base64编码的字符串 * @return base64编码的字符串
*/ */
public static String imageToBase64(String path){ public static String imageToBase64(String path){
if(TextUtils.isEmpty(path)){ if(StringUtils.isEmpty(path)){
return null; return null;
} }
InputStream is = null; InputStream is = null;
......
...@@ -3,11 +3,10 @@ package com.brilliance.isc.esb.api.ocr; ...@@ -3,11 +3,10 @@ package com.brilliance.isc.esb.api.ocr;
import com.brilliance.isc.esb.model.ocr.ReqTextDiff; import com.brilliance.isc.esb.model.ocr.ReqTextDiff;
import com.brilliance.isc.esb.model.ocr.ResOcrResult; import com.brilliance.isc.esb.model.ocr.ResOcrResult;
import com.brilliance.isc.esb.model.ocr.ResTextDiff; import com.brilliance.isc.esb.model.ocr.ResTextDiff;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import javax.ws.rs.GET; import org.springframework.web.bind.annotation.RequestBody;
import javax.ws.rs.PathParam; import org.springframework.web.bind.annotation.RequestParam;
import javax.ws.rs.QueryParam;
/** /**
* OCR 智能感知平台OCR请求方 * OCR 智能感知平台OCR请求方
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
<groupId>com.brilliance.isc</groupId> <groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-counter</artifactId> <artifactId>isc-common-counter</artifactId>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>io.springfox</groupId> <!-- <groupId>io.springfox</groupId>-->
<artifactId>springfox-boot-starter</artifactId> <!-- <artifactId>springfox-boot-starter</artifactId>-->
</dependency> <!-- </dependency>-->
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
......
package com.brilliance.isc.common.config; package com.brilliance.isc.common.config;
import io.swagger.annotations.Api; //import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Value; //import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import springfox.documentation.builders.ApiInfoBuilder;
//import springfox.documentation.builders.PathSelectors;
//import springfox.documentation.builders.RequestHandlerSelectors;
//import springfox.documentation.service.ApiInfo;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spring.web.plugins.Docket;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
//@Configuration //@Configuration
//@EnableOpenApi // 可选 //@EnableOpenApi // 可选
//@EnableWebMvc // spring-boot-starter-web冲突会引发启动服务时null,必选 //@EnableWebMvc // spring-boot-starter-web冲突会引发启动服务时null,必选
public class SwaggerConfig { public class SwaggerConfig {
@Value("${swagger.enable:true}") // @Value("${swagger.enable:true}")
private boolean enable; // private boolean enable;
//
@Bean // @Bean
public Docket createRestApi() { // public Docket createRestApi() {
return new Docket(DocumentationType.OAS_30) // 3.0要选择OAS_30 // return new Docket(DocumentationType.OAS_30) // 3.0要选择OAS_30
.apiInfo(apiInfo()) // .apiInfo(apiInfo())
.enable(enable) // .enable(enable)
.select() // .select()
.apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) // .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
.paths(PathSelectors.any()) // .paths(PathSelectors.any())
.build(); // .build();
} // }
//
private ApiInfo apiInfo() { // private ApiInfo apiInfo() {
return new ApiInfoBuilder() // return new ApiInfoBuilder()
.title("涉外汇款系统接口文档") // .title("涉外汇款系统接口文档")
.version("1.0") // .version("1.0")
.build(); // .build();
} // }
} }
...@@ -28,10 +28,11 @@ public class ISCRequestPreFilter implements ContainerRequestFilter { ...@@ -28,10 +28,11 @@ public class ISCRequestPreFilter implements ContainerRequestFilter {
@Context @Context
protected HttpServletRequest request; protected HttpServletRequest request;
@Context @Context
protected HttpHeaders header; protected HttpHeaders header;
@Resource @Resource
protected SettleContext settleContext; protected SettleContext settleContext;
...@@ -67,7 +68,7 @@ public class ISCRequestPreFilter implements ContainerRequestFilter { ...@@ -67,7 +68,7 @@ public class ISCRequestPreFilter implements ContainerRequestFilter {
sessionUserVo.setName(loginInfoVO.getUsr().getName()); sessionUserVo.setName(loginInfoVO.getUsr().getName());
sessionUserVo.setLogName(loginInfoVO.getUsername()); sessionUserVo.setLogName(loginInfoVO.getUsername());
sessionUserVo.setWorkOrg(loginInfoVO.getAccbchList().getBranch()); sessionUserVo.setWorkOrg(loginInfoVO.getAccbchList().getBranch());
sessionUserVo.setOwnOrgDepartmentNumber(loginInfoVO.getCurrentOrg().getDepartmentnumber()); sessionUserVo.setOwnOrgDepartmentNumber(loginInfoVO.getCurrentOrg().getDepartmentNumber());
settleContext.setSessionUserVo(sessionUserVo); settleContext.setSessionUserVo(sessionUserVo);
settleContext.simpleLoadSettleSession(); settleContext.simpleLoadSettleSession();
this.clearUserLock(requestURI,sessionUserVo); this.clearUserLock(requestURI,sessionUserVo);
......
...@@ -48,9 +48,9 @@ import org.springframework.util.ObjectUtils; ...@@ -48,9 +48,9 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StopWatch; import org.springframework.util.StopWatch;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.ws.rs.QueryParam;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -569,7 +569,7 @@ public class AbstractTransactionController<V extends BaseTransactionVo> { ...@@ -569,7 +569,7 @@ public class AbstractTransactionController<V extends BaseTransactionVo> {
* @return ResponseSet<TextResultVo> * @return ResponseSet<TextResultVo>
*/ */
@PostMapping("/showDocs") @PostMapping("/showDocs")
public ResponseSet<TextResultVo> showDocs(@RequestBody V vo, @QueryParam("idx") int idx) { public ResponseSet<TextResultVo> showDocs(@RequestBody V vo, @RequestParam("idx") int idx) {
SettleContext.setViewDocTransSta(); SettleContext.setViewDocTransSta();
String transName = vo.getTransName(); String transName = vo.getTransName();
StopWatch stopWatch = new StopWatch(transName+"报文/面函预览"+idx); StopWatch stopWatch = new StopWatch(transName+"报文/面函预览"+idx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment