JBOSS配置错误

时间:2014-03-22 16:57:27

标签: java-ee jboss

我正在尝试在JBOSS AS7中添加以下security-domain 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>

1 个答案:

答案 0 :(得分:1)

尝试以下principalQueryrolesQuery module-option描述符。实际上你需要在值部分中加上“select ....”。

<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=?"/>
相关问题