From 583ffd0037c204e29634526d271cca167dee67e7 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 6 Dec 2021 17:03:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=85=8D=E7=99=BB=E9=99=86=E6=8E=88=E6=9D=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- power-admin/pom.xml | 11 ++++ .../controller/JAXDynamicClientFactory.java | 53 +++++++++++++++++++ .../src/main/resources/config/jdbc.properties | 4 +- 3 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 power-admin/src/main/java/com/manage/controller/JAXDynamicClientFactory.java diff --git a/power-admin/pom.xml b/power-admin/pom.xml index 75784cf..12a8a49 100644 --- a/power-admin/pom.xml +++ b/power-admin/pom.xml @@ -127,6 +127,17 @@ org.slf4j slf4j-log4j12 + + org.jdom + jdom2 + 2.0.6 + + + org.springframework.boot + spring-boot + 2.5.5 + + power diff --git a/power-admin/src/main/java/com/manage/controller/JAXDynamicClientFactory.java b/power-admin/src/main/java/com/manage/controller/JAXDynamicClientFactory.java new file mode 100644 index 0000000..fa523be --- /dev/null +++ b/power-admin/src/main/java/com/manage/controller/JAXDynamicClientFactory.java @@ -0,0 +1,53 @@ +package com.manage.controller; + +import org.apache.cxf.Bus; +import org.apache.cxf.bus.CXFBusFactory; +import org.apache.cxf.endpoint.EndpointImplFactory; +import org.apache.cxf.endpoint.dynamic.DynamicClientFactory; +import org.apache.cxf.jaxws.support.JaxWsEndpointImplFactory; + +import java.util.List; + +/** + * @ProjectName: + * @Description: + * @Param 传输参数 + * @Return + * @Author: 曾文和 + * @CreateDate: 2019/9/11 16:15 + * @UpdateUser: 曾文和 + * @UpdateDate: 2019/9/11 16:15 + * @UpdateRemark: 更新说明 + * @Version: 1.0 + */ +public class JAXDynamicClientFactory extends DynamicClientFactory { + protected JAXDynamicClientFactory(Bus bus) { + super(bus); + } + + @Override + protected EndpointImplFactory getEndpointImplFactory() { + return JaxWsEndpointImplFactory.getSingleton(); + } + + @Override + protected boolean allowWrapperOps() { + return true; + } + + + public static JAXDynamicClientFactory newInstance() { + Bus bus = CXFBusFactory.getThreadDefaultBus(); + return new JAXDynamicClientFactory(bus); + } + @Override + public boolean compileJavaSrc(String classPath, List srcList, String dest) { + org.apache.cxf.common.util.Compiler javaCompiler + = new org.apache.cxf.common.util.Compiler(); + javaCompiler.setEncoding("UTF-8"); + javaCompiler.setClassPath(classPath); + javaCompiler.setOutputDir(dest); + javaCompiler.setTarget("1.8"); + return javaCompiler.compileFiles(srcList); + } +} diff --git a/power-admin/src/main/resources/config/jdbc.properties b/power-admin/src/main/resources/config/jdbc.properties index a51355d..47022d3 100644 --- a/power-admin/src/main/resources/config/jdbc.properties +++ b/power-admin/src/main/resources/config/jdbc.properties @@ -1,7 +1,7 @@ jdbc.driver=com.mysql.jdbc.Driver -jdbc.url=jdbc\:mysql\://192.168.1.3\:3306/qfpower?useUnicode\=true&characterEncoding\=utf-8 +jdbc.url=jdbc\:mysql\://192.168.1.3\:3306/nanfang_hospital?useUnicode\=true&characterEncoding\=utf-8 jdbc.username=root -jdbc.password=docus702 +jdbc.password=mamba1998 #hibernate config hibernate.dialect = org.hibernate.dialect.MySQLDialect