当前位置:   article > 正文

Exception in thread “main“ java.lang.NoClassDefFoundError: org/apache/velocity/context/Context at_exception in thread "main" java.lang.noclassdeffou

exception in thread "main" java.lang.noclassdeffounderror: org/apache/veloci
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

错误原因:缺少依赖
安装依赖

        <!-- 模板引擎 -->
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity-engine-core</artifactId>
            <version>2.0</version>
        </dependency>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/201409
推荐阅读
相关标签
  

闽ICP备14008679号