引入包
import org.bouncycastle.jce.provider.BouncyCastleProvider;
在类中加入如下代码:

static{
Security.addProvider(new BouncyCastleProvider());
}

效果如下:

解决:Cannot find any provider supporting SM4/CBC/PKCS5Padding_sm4