Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/velocity/context/Context
at com.baomidou.mybatisplus.generator.AutoGenerator.execute(AutoGenerator.java:95)
at com.zys.website.generator.CodeGenerator.main(CodeGenerator.java:72)
Caused by: java.lang.ClassNotFoundException: org.apache.velocity.context.Context
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
错误原因:缺少依赖
安装依赖
<!-- 模板引擎 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.0</version>
</dependency>