hutool-all sm4加密报错 Cannot find any provider supporting SM4/CBC/PKCS5Padding
一般是缺少jar包导致的,需要引入下面两个包:
<!--hutool-->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<!--hutool 加密需要引入-->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>${bcprov-jdk15on.version}</version>
</dependency>