mybatis-plus自动生成的时候报错java.lang.NoClassDefFoundError: org/apache/velocity/context/Context

当使用mybatisplus的代码自动生成的时候报错
09:02:44.188 [main] DEBUG com.baomidou.mybatisplus.generator.AutoGenerator - 准备生成文件…
Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/velocity/context/Context
at com.baomidou.mybatisplus.generator.AutoGenerator.execute(AutoGenerator.java:95)
at com.wj.testdemo.WjCode.main(WjCode.java:83)
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:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
… 2 more

Process finished with exit code 1
mybatis-plus自动生成的时候报错java.lang.NoClassDefFoundError: org/apache/velocity/context/Context_第1张图片
原因是因为缺少了依赖

		
            org.apache.velocity
            velocity-engine-core
            2.0
        

加上依赖即可

你可能感兴趣的:(MyBatisPlus,maven,mybatis,java)