Commit 56101d03 by hulei

修正resteasy依赖

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