经过一晚上的折腾,终于搞定,成功切换Mysql
步骤一:
安装mysql 数据库 创建数据库 名字为jbpm 设置用户名密码 我本地默认使用 root
步骤二:
** 修改配置文件 **
F:\jbpm-6.5.0.Final-installer-full\jbpm-installer下 standalone-full-wildfly-10.0.0.Final.xml 和 standalone-wildfly-10.0.0.Final.xml
由于根据官网 我本地下载的jboss服务器是 widfly10 所以 只需要修改上面的配置文件就可以了,然后 当用ant命令时,ant会自动把这2个文件的内容复制到 F:\jbpm-6.5.0.Final-installer-full\jbpm-installer\wildfly-10.0.0.Final\standalone\configuration 中
两个文件作同样的修改。
修改前
jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE h2 sa sa jdbc:h2:tcp://localhost/~/jbpm-db;MVCC=TRUE h2 sa org.h2.jdbcx.JdbcDataSource
修改后
jdbc:mysql://localhost:3306/jbpm mysql root root jdbc:mysql://localhost:3306/jbpm mysql root root com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
步骤三:
修改配置文件
F:\jbpm-6.5.0.Final-installer-full\jbpm-installer\db 下 的 jbpm-persistence-JPA2.xml 和 mysql_module.xml
jbpm-persistence-JPA2.xml 中
修改前
修改后
mysql_module.xml 中
**修改前 **
<resource-root path="mysql-connector-java.jar"/>
修改后
官网:this file is called db/mysql_module.xml. Open this file and make sure that the file name of the driver jar listed there is identical the driver jar name you specified in the build.properties (including the version). Note that, even if you simply uncommented the default MySQL configuration, you will still need to add the right version here.
步骤四:
修改配置文件 build.properties
F:\jbpm-6.5.0.Final-installer-full\jbpm-installer 下
修改前
# default is H2H2.version=1.3.168db.name=h2db.driver.jar.name=h2-${H2.version}.jar db.driver.download.url= http://repo1.maven.org/maven2/com/h2database/h2/${H2.version}/h2-${H2.version}.jar #other options are:#mysql# db.name=mysql# db.driver.module.prefix=com/mysql# db.driver.jar.name=mysql-connector-java-5.1.18.jar #db.driver.download.url= https://repository.jboss.org/nexus/service/local/repositories/central/content/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar
修改后
# default is H2 #H2.version=1.3.168 #db.name=h2 #db.driver.jar.name=h2-${H2.version}.jar #db.driver.download.url= http://repo1.maven.org/maven2/com/h2database/h2/${H2.version}/h2-${H2.version}.jar#other options are:#mysql db.name=mysql db.driver.module.prefix=com/mysql db.driver.jar.name=mysql-connector-java-5.1.18.jar db.driver.download.url= https://repository.jboss.org/nexus/service/local/repositories/central/content/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar
到此 修改工作结束,接着就是 尝试 ant 命令
如图:
说明 部署成功
到此 修改 数据库 有H2 转成 mysql 成功
欢迎 各位大佬 光临指正 有问题 在线留言