将属性'algorithm'设置为 'MD5' 找不到匹配的属性



>我在 tomcat 7 中定义了一个领域

<Realm className="hasan.realm.MyRealm"
dataSourceName="jdbc/MyDb"
algorithm="MD5"
secureDataFilePath="${catalina.home}/set/users.xml"
secureDataSalt="lsi9435fmc9043593mv387cm03298"
userTable="User" userNameCol="username" userCredCol="password" 
userRoleTable="Roles" roleNameCol="role">
<CredentialHandler className="org.apache.catalina.realm.MessageDigestCredentialHandler" algorithm="MD5"/>
</Realm>

在 Tomcat 8.5 中,我收到警告:

08-Sep-2017 08:46:15.822 WARNUNG [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Engine/Host/Realm} Setting property 'algorithm' to 'MD5' did not find a matching property. 

这可能为时已晚,但我今天遇到了同样的问题,所以也许它将来对某人有用。

警告是指您在Realm本身上设置的algorithm="MD5"属性 - 该属性已在 Tomcat 8.5 中删除,以便像您在示例中所做的那样使用CredentialHandler元素。

最新更新