Error —— com.sun.crypto.provider.HmacSHA1 cannot be cast to javax.crypto.MacSpi

question

        The unit test error is as follows:

        com.sun.crypto.provider.HmacSHA1 cannot be cast to javax.crypto.MacSpi

solve

        Reason: md5 authentication error.

        Add annotations to the class .

@PowerMockIgnore("javax.crypto.*")

Guess you like

Origin blog.csdn.net/xue_xiaofei/article/details/122481567