Wildfly部署drools-workbench

首先下载drools-workbench

drools官网

目前的最新版本是7.73.0.Final

新版的workbench 已经不支持Tomcat部署了,需要使用wildfly部署,最新的wildfly26.1.1但是测试下来部署workbench会失败,需要下载对应版本的wildfly,如图所示当前workbench对应的wildfly的版本是23。wildfly下载

下载完成后首先解压wildfly。修改bin目录下的 standalone.conf.bat 文件

将默认配置

set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m"

 改为

set "JAVA_OPTS=-Xms64M -Xmx1024M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8"

可以根据自己机器的配置适当更改,采用默认配置的话,部署drools-workbench时会报内存溢出,从而导致部署失败,同时默认配置的话drools-workbench中文乱码(是wildfly导致的),配置完成后,drools-workbech正常显示中文

接下来开始添加用户。

1.添加管理用户

D:\wildfly-23.0.0.Final\bin>add-user.bat

# 选择添加管理员账户
What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): a

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.

# 输入管理员账户(这里我选择admin,注意admin是默认账户,因此我这里的意思是修改admin用户,因为新安装的wildfly并不知道amdin用户的密码)
Username : admin

# 选择修改admin账户
User 'admin' already exists and is disabled, would you like to...
 a) Update the existing user password and roles
 b) Enable the existing user
 c) Type a new username
(a): a

Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should be different from the username
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
# 输入admin用户密码
Password :
WFLYDM0098: The password should be different from the username
Are you sure you want to use the password entered yes/no? yes

# 确认密码
Re-enter Password :

# 输入admin用户所属组(注意输入admin)
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]: admin

Updated user 'admin' to file 'D:\wildfly-23.0.0.Final\standalone\configuration\mgmt-users.properties'
Updated user 'admin' to file 'D:\wildfly-23.0.0.Final\domain\configuration\mgmt-users.properties'
Updated user 'admin' with groups admin to file 'D:\wildfly-23.0.0.Final\standalone\configuration\mgmt-groups.properties'
Updated user 'admin' with groups admin to file 'D:\wildfly-23.0.0.Final\domain\configuration\mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server Jakarta Enterprise Beans calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="YWRtaW4=" />
请按任意键继续. . .

2.添加应用用户

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

# 执行添加用户命令
D:\wildfly-23.0.0.Final\bin>add-user.bat

# 选择添加应用类型的用户
What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): b

Enter the details of the new user to add.
Using realm 'ApplicationRealm' as discovered from the existing property files.

# 输入用户名(随便输入)
Username : workbench

Password recommendations are listed below. To modify these restrictions edit the
 add-user.properties configuration file.
 - The password should be different from the username
 - The password should not be one of the following restricted values {root, admi
n, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s),
 1 digit(s), 1 non-alphanumeric symbol(s)

#密码也是随便输入,不过建议按照上面提示的输入
Password :
WFLYDM0098: The password should be different from the username
Are you sure you want to use the password entered yes/no? yes

#重复密码
Re-enter Password :

# 输入用户所属组(这里一定要填写admin,否则后续用户无法登录drools-workbench)
What groups do you want this user to belong to? (Please enter a comma separated
list, or leave blank for none)[  ]: admin

About to add user 'workbench' for realm 'ApplicationRealm'
Is this correct yes/no? yes

Added user 'workbench' to file 'D:\wildfly-23.0.0.Final\standalone\configuration
\application-users.properties'
Added user 'workbench' to file 'D:\wildfly-23.0.0.Final\domain\configuration\app
lication-users.properties'
Added user 'workbench' with groups admin to file 'D:\wildfly-23.0.0.Final\standa
lone\configuration\application-roles.properties'
Added user 'workbench' with groups admin to file 'D:\wildfly-23.0.0.Final\domain
\configuration\application-roles.properties'
Is this new user going to be used for one AS process to connect to another AS pr
ocess?
e.g. for a slave host controller connecting to the master or for a Remoting conn
ection for server to server Jakarta Enterprise Beans calls.
yes/no? yes
To represent the user add the following to the server-identities definition <sec
ret value="d29ya2JlbmNo" />
请按任意键继续. . .

添加完上面两个用户后,将drools-workbench的war包放到 standalone/deployments 目录下 执行启动命令

D:\wildfly-23.0.0.Final\bin>standalone.bat

等待启动。wildfly默认的管理端口是9990 应用端口是8080。

启动完成之后,浏览器打开 localhost:9990。输入上面创建的管理用户

点击 Context Root 跳转到 drools-workbench登录界面

输入上面创建的应用用户,登录即可 

登录完成后点击右上角叫设置按钮

可以看到角色模块 全部的角色信息,接下来我们便可以在drools-workbench中添加用户了

猜你喜欢

转载自blog.csdn.net/kanyun123/article/details/126042714
今日推荐