# uRule-boot **Repository Path**: wisedak/uRule-boot ## Basic Information - **Project Name**: uRule-boot - **Description**: uRule pro4示例项目 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2024-01-23 - **Last Updated**: 2024-01-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # urule pro4 demo ## 1.介绍 * URule示例项目:springboot+maven应用示例 * 在线文档:https://www.bstek.com/resources/doc/4.0/ * 有任何问题欢迎添加QQ(351715466)沟通交流 ## 2.安装教程 ### 2.1 将项目下载到本地,导入到idea中... ### 2.2 自动完成初始化安装 * 在urule-init.properties中指定urule.home为一个存在的磁盘路径 * 在logback-spring.xml中指定LOG_HOME为某一个地址 * 启动服务,运行Application.java * 控制台打印如下日志 ``` [2023-07-19 19:46:30.127] [main] INFO c.b.u.c.c.bootstrap.BootstrapManager : URule Home:/Users/hans/coding/uruleDemoRepo [2023-07-19 19:46:30.127] [main] ERROR c.b.u.c.c.bootstrap.BootstrapManager : 未能完成配置文件加载,需要先进行配置文件初始化工作.请参考:http://www.bstek.com/resources/doc/4.0/config/2.2setup.html ``` ### 2.3 手工完成初始化安装 * 在spring配置文件中指定数据源,例如以下是在application.properties中指定mysql数据源连接信息 ``` #----- MySQL Connection ---- urule.store.database.driver=com.mysql.jdbc.Driver urule.store.database.password=mysql urule.config.type=jdbc urule.store.database.validationQuery=select 1 urule.store.database.maxIdle=10 urule.store.database.initialsize=10 urule.store.database.platform=mysql urule.store.database.maxTotal=30 urule.store.database.username=root urule.store.database.url=jdbc:mysql://localhost:3306/urule?useUnicode=true&characterEncoding=UTF-8&useSSL=false urule.store.database.minIdle=10 ``` * 在urule-init.properties中指定urule.home为空,或者是注释掉该行配置项 * 执行sql文件,手工完成数据库的初始化 * 在logback-spring.xml中指定LOG_HOME为某一个地址 * 启动服务,运行Application.java * 控制台打印如下日志 ``` [2023-07-19 19:42:55.957] [main] INFO c.b.u.c.c.bootstrap.BootstrapManager : URule Home:null [2023-07-19 19:42:55.958] [main] INFO c.b.u.c.c.bootstrap.BootstrapManager : [URULE-CONSOLE]检测到Environment配置信息,开始初始化... [2023-07-19 19:42:56.199] [main] INFO c.b.u.c.c.bootstrap.BootstrapManager : [URULE-CONSOLE]初始化完成! ``` ### 2.4 附各种数据库源配置信息 ``` #----- Connection Provider---- #urule.config.type=connection #urule.store.database.platform=mysql #urule.store.database.classname=com.urule.service.DefaultConnectionProvider #----- DM Connection ---- #urule.config.type=jdbc #urule.store.database.username=sysdba #urule.store.database.password=password #urule.store.database.driver=dm.jdbc.driver.DmDriver #urule.store.database.url=jdbc:dm://192.168.31.76:5236/urule #urule.store.database.validationQuery=SELECT 1; #urule.store.database.maxIdle=10 #urule.store.database.initialsize=0 #urule.store.database.maxTotal=10 #urule.store.database.minIdle=0 #----- HSQL Connection ---- #urule.config.type=jdbc #urule.store.database.platform=hsql #urule.store.database.username=sa #urule.store.database.driver=org.hsqldb.jdbcDriver #urule.store.database.url=jdbc:hsqldb:file:/Users/william/Projects/java/urule-pro-boot/home2/data/uruledb #urule.store.database.validationQuery=select 1 from INFORMATION_SCHEMA.SYSTEM_USERS #urule.store.database.maxIdle=10 #urule.store.database.initialsize=0 #urule.store.database.maxTotal=10 #urule.store.database.minIdle=0 #----- JNDI Connection ---- #urule.config.type=jndi #urule.store.database.platform=mysql #urule.store.database.jndiname=java:comp/env/ruledb #----- MySQL Connection ---- urule.store.database.driver=com.mysql.jdbc.Driver urule.store.database.password=mysql urule.config.type=jdbc urule.store.database.validationQuery=select 1 urule.store.database.maxIdle=10 urule.store.database.initialsize=10 urule.store.database.platform=mysql urule.store.database.maxTotal=30 urule.store.database.username=root urule.store.database.url=jdbc:mysql://localhost:3306/urule?useUnicode=true&characterEncoding=UTF-8&useSSL=false urule.store.database.minIdle=10 #----- Oracle Connection ---- #urule.config.type=jdbc #urule.store.database.platform=oracle #urule.store.database.username=sys as sysdba #urule.store.database.password=Bstek2021 #urule.store.database.driver=oracle.jdbc.OracleDriver #urule.store.database.url=jdbc:oracle:thin:@localhost:1521:orcl #urule.store.database.validationQuery=select 1 from dual #urule.store.database.maxIdle=10 #urule.store.database.initialsize=0 #urule.store.database.maxTotal=10 #urule.store.database.minIdle=0 #----- SqlServer Connection ---- #urule.config.type=jdbc #urule.store.database.platform=sqlserver #urule.store.database.username=sa #urule.store.database.password=password #urule.store.database.url=jdbc:sqlserver://localhost:1433;databaseName=urule;SelectMethod=cursor #urule.store.database.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver #urule.store.database.validationQuery=select 1 #urule.store.database.maxIdle=10 #urule.store.database.initialsize=0 #urule.store.database.maxTotal=10 #urule.store.database.minIdle=0 ```