我正在尝试将以下security-domain添加到JBOSS AS7 standalone.xml中
<security-domain name="form-authentication" cache-type="default">
<authentication>
<login-module code="Database" flag="sufficient">
<module-option name="dsJndiName" value="java:jboss/datasources/MySqlDS"/>
<module-option name="principalsQuery">select password from Users_Authentication where username=?</module-option>
<module-option name="rolesQuery">select rolename, 'Roles' from Users_Roles where username=?</module-option>
</login-module>
</authentication>
</security-domain>但是我有以下错误:Missing required attribute(s): value (指向第二个模块-选项)。我已经尝试过放置value="",但是出现了一个新的错误,指向结束标记</module-option>。
发布于 2014-03-22 17:06:58
尝试以下principalQuery和rolesQuery module-option描述符。实际上你需要把“选择.”在价值观部分。
<module-option name="principalsQuery" value="select password from Users_Authentication where username=?"/>
<module-option name="rolesQuery" value="select rolename, 'Roles' from Users_Roles where username=?"/>https://stackoverflow.com/questions/22580650
复制相似问题