Explorar el Código

修改配置才能正常启动

master
huminghao hace 3 semanas
padre
commit
e7305617d5

+ 23
- 23
zhywpt-service-ods/src/main/java/cn/com/taiji/ods/web/JsonPostServiceController.java Ver fichero

*/ */
@RestController @RestController
public class JsonPostServiceController extends BaseJsonPostController { public class JsonPostServiceController extends BaseJsonPostController {
@Autowired
private JsonPostHandleManager handleManager;
@CrossOrigin
@RequestMapping(value = "/api/json", method = RequestMethod.POST)
public void jsonPostRequest(@RequestBody SignJsonRequest req, HttpServletRequest request, HttpServletResponse response)
throws IOException {
response.setCharacterEncoding("UTF-8");
super.handleComm(req, req.getReqId(), handleManager, request, response);
}
@Trace
@Tag(key = "req", value = "arg[0]")
@Tag(key = "reqId", value = "arg[1]")
@CrossOrigin
@RequestMapping(value = "/api/json/{reqId}", method = RequestMethod.POST)
public void jsonPostRequest(@RequestBody SignJsonRequest req, @PathVariable("reqId") String reqId,
HttpServletRequest request, HttpServletResponse response) throws IOException {
String traceId = TraceContext.traceId();
logger.info("traceId:{},jsonReq:{}",traceId,req);
response.setCharacterEncoding("UTF-8");
super.handleComm(req, req.getReqId(), handleManager, request, response);
}
// @Autowired
// private JsonPostHandleManager handleManager;
//
// @CrossOrigin
// @RequestMapping(value = "/api/json", method = RequestMethod.POST)
// public void jsonPostRequest(@RequestBody SignJsonRequest req, HttpServletRequest request, HttpServletResponse response)
// throws IOException {
// response.setCharacterEncoding("UTF-8");
// super.handleComm(req, req.getReqId(), handleManager, request, response);
// }
//
// @Trace
// @Tag(key = "req", value = "arg[0]")
// @Tag(key = "reqId", value = "arg[1]")
// @CrossOrigin
// @RequestMapping(value = "/api/json/{reqId}", method = RequestMethod.POST)
// public void jsonPostRequest(@RequestBody SignJsonRequest req, @PathVariable("reqId") String reqId,
// HttpServletRequest request, HttpServletResponse response) throws IOException {
// String traceId = TraceContext.traceId();
// logger.info("traceId:{},jsonReq:{}",traceId,req);
// response.setCharacterEncoding("UTF-8");
// super.handleComm(req, req.getReqId(), handleManager, request, response);
// }
} }

+ 4
- 4
zhywpt-service-ods/src/main/resources/bootstrap.yml Ver fichero

spring: spring:
application: application:
name: sample
name: ods
mvc: mvc:
locale: zh_CN locale: zh_CN
messages: messages:
server: server:
port: 8086 port: 8086
servlet: servlet:
context-path: /sample/
context-path: /ods/


#应用相关配置 #应用相关配置
app: app:
nodeNum: 001 nodeNum: 001
path: D:/devEnv/sample/ #工程的目录,#sso集成默认读取该目录下的oauth_client.properties
path: D:/devEnv/ods/ #工程的目录,#sso集成默认读取该目录下的oauth_client.properties
comm: comm:
# 自定义服务地址map,key为服务名、value为服务地址。如果配置了服务地址,接口调用时请求到该地址,如果没配置,默认请求到gateway # 自定义服务地址map,key为服务名、value为服务地址。如果配置了服务地址,接口调用时请求到该地址,如果没配置,默认请求到gateway
serviceAddr: serviceAddr:
sample: http://127.0.0.1:8086
ods: http://127.0.0.1:8086

Cargando…
Cancelar
Guardar