flowable不支持人大金仓数据库，需要做一些自定义处理。一、springboot2.x + flowable6.8 + kingbase1、liquibase金仓数据库支持import liquibase.database.DatabaseConnection; import liquibase.database.core.PostgresDatabase; import liquibase.exception.DatabaseException; /** * liquibase 金仓数据库支持 */ public class Kingbase8Database extends PostgresDatabase { public static final String PRODUCT_NAME = "KingbaseES"; private static final int DEFAULT_TCP_PORT_NUMBER = 54321; @Override public String getShortName() { return "kingbase8"; // 返回一个标识符 } @Override public Integer getDefaultPort() { return DEFAULT_TCP_PORT_NUMBER; } @Override protected String getDefaultDatabaseProductName() { return PRODUCT_NAME; } @Override public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException { return PRODUCT_NAME.equalsIgnoreCase(conn.getDatabaseProductName()); } @Override public String getDefaultDriver(String url) { if (url.startsWith("jdbc:kingbase8:")) { return "com.kingbase8.Driver"; } return null; } } 2、flowable配置里设置金仓数据库的数据库类型，根据金仓数据库安装的哪种兼容模式来设置，这里以Mysql为例。liquibase注册金仓数据库支持。import com.baomidou.mybatisplus.annotation.DbType; import liquibase.database.DatabaseFactory; import org.flowable.app.spring.SpringAppEngineConfiguration; import org.flowable.common.engine.impl.AbstractEngineConfiguration; import org.flowable.engine.impl.db.DbIdGenerator; import org.flowable.spring.SpringProcessEngineConfiguration; import org.flowable.spring.boot.EngineConfigurationConfigurer; import org.springframework.context.annotation.Configuration; /** * Flowable配置 */ @Configuration public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> { @Override public void configure(SpringProcessEngineConfiguration engineConfiguration) { engineConfiguration.setActivityFontName("宋体"); engineConfiguration.setLabelFontName("宋体"); engineConfiguration.setAnnotationFontName("宋体"); // 流程id生成处理 engineConfiguration.setIdGenerator(new DbIdGenerator()); if (DataSourceUtils.getCurrentDbType() == DbType.KINGBASE_ES) { // flowable设置金仓数据库的数据库类型 SpringAppEngineConfiguration appEngineConfiguration = SpringUtils.getBean(SpringAppEngineConfiguration.class); appEngineConfiguration.setDatabaseType(AbstractEngineConfiguration.DATABASE_TYPE_MYSQL); // liquibase添加金仓数据库支持 DatabaseFactory.getInstance().register(new Kingbase8Database()); } } } 3、application.yml 配置文件禁用flowable数据库自动建表# flowable配置 flowable: # 是否自动建表 databaseSchemaUpdate: false 二、springboot3.x + flowable7.1 + kingbase1、flowable配置里设置金仓数据库的数据库类型，根据金仓数据库安装的哪种兼容模式来设置，这里以Mysql为例。import com.baomidou.mybatisplus.annotation.DbType; import org.flowable.app.spring.SpringAppEngineConfiguration; import org.flowable.common.engine.impl.AbstractEngineConfiguration; import org.flowable.engine.impl.db.DbIdGenerator; import org.flowable.spring.SpringProcessEngineConfiguration; import org.flowable.spring.boot.EngineConfigurationConfigurer; import org.springframework.context.annotation.Configuration; /** * Flowable配置 */ @Configuration public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> { @Override public void configure(SpringProcessEngineConfiguration engineConfiguration) { engineConfiguration.setActivityFontName("宋体"); engineConfiguration.setLabelFontName("宋体"); engineConfiguration.setAnnotationFontName("宋体"); engineConfiguration.setIdGenerator(new DbIdGenerator()); if (DataSourceUtils.getCurrentDbType() == DbType.KINGBASE_ES) { // flowable设置金仓数据库的数据库类型 SpringAppEngineConfiguration appEngineConfiguration = SpringUtils.getBean(SpringAppEngineConfiguration.class); appEngineConfiguration.setDatabaseType(AbstractEngineConfiguration.DATABASE_TYPE_MYSQL); } } } 2、application.yml 配置文件禁用flowable数据库自动建表# flowable配置 flowable: # 是否自动建表 databaseSchemaUpdate: false
参考文章：https://blog.csdn.net/scy411082514/article/details/7493386jsom jar包josm-tested.jar
基于 graphhopper/map-matching 实现https://github.com/graphhopper/map-matching 国内加速项目：https://gitee.com/manonghome/map-matching map-matching的生成参考：使用graphhopper(map-matching)进行地图匹配map-matching编译生成比较麻烦，特别是被墙的情况下，这是生成好的jar包map-matching.zip生成 graph-cache java -jar graphhopper-map-matching-web-3.0-SNAPSHOT.jar import guangxi-latest.osm.pbf 匹配 java -jar graphhopper-map-matching-web-3.0-SNAPSHOT.jar match test1.gpx web启动 java -jar graphhopper-map-matching-web-3.0-SNAPSHOT.jar server config.yml 路线规划API http://localhost:8989/route?point=22.815811066579542%2C108.32804765209262&point=22.833897710582203%2C108.36660922414482&profile=car&locale=zh_CN 轨迹纠偏API http://localhost:8989/match?vehicle=car&type=json Content-Type: application/gpx+xml 请求体：gpx文件内容
ureport2的日期控件是基于 bootstrap-datetimepicker，需要修改3个文件首先报表设计页面，在设置查询条件日期控件的格式里添加年、月ureport\ureport2-js\src\form\property\DatetimeProperty.js 其次报表设计页面，在渲染日期控件时添加年、月支持ureport\ureport2-js\src\form\instance\DatetimeInstance.js 最后在输出报表页面的时间控件里添加年、月支持ureport\ureport2-core\src\main\java\com\bstek\ureport\definition\searchform\DateInputComponent.java
Dependency-Check是OWASP（Open WebApplication Security Project）的一个实用开源程序，用于识别项目依赖项并检查是否存在任何已知的，公开披露的漏洞。我们可以使用这个应用来进行相关依赖包的扫描。https://github.com/dependency-check-team/dependency-check有两种扫描方式，应用扫描和插件扫描参考：https://www.jianshu.com/p/3af30f4b73f2应用扫描1、扫描工具使用依赖包扫描工具.zipbin 目录为执行脚本scan 目录为扫描目录out 目录为报告输出目录将要扫描的项目文件放到scan目录，执行bin目录下 启动 - 不扫描js.bat，到out目录查看生成的报告。可以扫描jar、dll的漏洞2、扫描js使用方法使用 启动 - 扫描js.bat ，可以扫描js、jar、dll的漏洞注意事项：js的漏洞档案文件经常下载不了，会报错。此时可以把 data 目录下的 jsrepository - bak.json 文件的内容复制到 jsrepository.json ，即可以扫描。不要重命名 jsrepository - bak.json 文件，文件修改日期不是当前日期还是会执行更新过程。3、修复漏洞可能需要用到的网站：漏洞库：OSCS：https://www.oscs1024.com/hl阿里云：https://avd.aliyun.com/jar包版本库：mvnrepository：https://mvnrepository.comnexusrepository：https://maven-us.nuxeo.org/nexus/
btnCreate.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCreate.setEnabled(false); new SwingWorker<StringBuilder, String>(){ @Override protected StringBuilder doInBackground() throws Exception { actionCreate(); return null; } @Override protected void process(List<String> chunks) { super.process(chunks); } @Override protected void done() { super.done(); btnCreate.setEnabled(true); } }.execute(); } });
private void CreateUtf8File(File configFile) { try { configFile.createNewFile(); //BufferedWriter output = new BufferedWriter(new FileWriter(configFile)); BufferedWriter output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(configFile), "UTF-8")); output.write("你好啊"); output.close(); } catch (IOException e) { e.printStackTrace(); } } 要创建GBK格式文件，将UTF-8替换为GBK即可。
bat执行java桌面程序后自动关闭命令窗口
@echo off %1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::",0,FALSE)(window.close)&&exit javaw -jar builder.jar exit 桌面程序用 javaw -jar，非桌面程序用 java -jar
一、Main类定义输出控件，实例化窗口后赋值为JTextArea控件public class Main { public static JTextArea text = null;//输出日志的控件 public static void main(String[] args) { JFrame frame = new JFrame("窗口"); App app = new App(); frame.setContentPane(app.panel1); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); frame.setResizable(false); frame.setLocationRelativeTo(null); Main.text = app.txtConsoleMsg; app.Init(); } } 二、自定义Appenderpackage com.test.util; import com.test.Main; import org.apache.logging.log4j.core.Filter; import org.apache.logging.log4j.core.Layout; import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.core.appender.AbstractAppender; import org.apache.logging.log4j.core.config.plugins.Plugin; import org.apache.logging.log4j.core.config.plugins.PluginAttribute; import org.apache.logging.log4j.core.config.plugins.PluginElement; import org.apache.logging.log4j.core.config.plugins.PluginFactory; import org.apache.logging.log4j.core.layout.PatternLayout; import javax.swing.*; import java.io.Serializable; @Plugin(name = "JTextArea", category = "Core", elementType = "appender", printObject = true) public class JTextAreaAppender extends AbstractAppender { protected JTextAreaAppender(String name, Filter filter, Layout<? extends Serializable> layout, boolean ignoreExceptions) { super(name, filter, layout, ignoreExceptions); } @Override public void append(LogEvent logEvent) { String msg = logEvent.getMessage().getFormattedMessage(); SwingUtilities.invokeLater(new Runnable() { public void run() { if (Main.text != null) { Main.text.append(msg + "\n");//输出日志到窗口控件 } } }); } // 下面这个方法可以接收配置文件中的参数信息 @PluginFactory public static JTextAreaAppender createAppender(@PluginAttribute("name") String name, @PluginElement("Filter") final Filter filter, @PluginElement("Layout") Layout<? extends Serializable> layout, @PluginAttribute("ignoreExceptions") boolean ignoreExceptions) { if (name == null) { LOGGER.error("No name provided for MyCustomAppenderImpl"); return null; } if (layout == null) { layout = PatternLayout.createDefaultLayout(); } return new JTextAreaAppender(name, filter, layout, ignoreExceptions); } } 二、配置log4j2.xml文件<?xml version="1.0" encoding="UTF-8"?> <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> <JTextArea name="JTextArea"/> <appender-ref ref="Console"/> <Appender-Ref ref="JTextArea"/>
准备工作：1、下载MAVEN（这里用到的是V3.6.3），解压后把bin目录配置到环境变量；2、下载IKVM（这里用到的是ikvmbin-8.1.5717.0.zip），解压后把bin目录配置到环境变量；3、安装JDk1.8；4、下载 xxl-sso-v1.1.0，解压后得到 xxl-sso-core 项目；开始：1、修改 pom.xml，添加 slf4j-simple、cglib 的引用，添加 build 节点用于mvn打包。slf4j-simple 处理提示： Failed to load class "org.slf4j.impl.StaticLoggerBinder" 或者 warning IKVMC0100: Class "org.slf4j.impl.StaticLoggerBinder" not found ；cglib 处理提示： warning IKVMC0100: Class "net.sf.cglib.proxy.MethodInterceptor" not found 。<?xml version="1.0" encoding="UTF-8"?> 4.0.0 com.xuxueli xxl-sso 1.1.0 xxl-sso-core jar javax.servlet javax.servlet-api ${javax.servlet-api.version} cglib cglib 3.2.4 org.slf4j slf4j-api ${slf4j-api.version} org.slf4j slf4j-simple ${slf4j-api.version} redis.clients jedis ${jedis.version} maven-assembly-plugin com.xxl.sso.core.util.JedisUtil jar-with-dependencies 2、在 xxl-sso-core 项目目录打开CMD窗口，执行以下命令，在 target 目录会生成 xxl-sso-core-1.1.0-jar-with-dependencies.jar 。mvn assembly:assembly 3、在 xxl-sso-core 的 target 目录打开CMD窗口，执行以下命令，同目录下生成 xxl-sso-core-1.1.0-jar-with-dependencies.dll，大功告成。ikvmc -target:library xxl-sso-core-1.1.0-jar-with-dependencies.jar 参考文章：https://blog.csdn.net/a748448660/article/details/81776193https://www.cnblogs.com/tuifeideyouran/p/5277893.htmlhttps://blog.csdn.net/u010696630/article/details/84991116https://stackoverflow.com/questions/40203004/java-class-not-found-net-sf-cglib-proxy-methodinterceptor