赞
踩
在使用mybatis-plus自动生成时报出了错误
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/velocity/context/Context
at com.baomidou.mybatisplus.generator.AutoGenerator.execute(AutoGenerator.java:175)
at com.baomidou.mybatisplus.generator.AutoGenerator.execute(AutoGenerator.java:159)
at com.credit.verify.utils.MyBatisPlusGenerator.main(MyBatisPlusGenerator.java:100)
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:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 3 more
这种一看就是缺少jar包导致
解决方案
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.3</version>
</dependency>
成功!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。