09:39:23.593 [main] DEBUG com.baomidou.mybatisplus.generator.AutoGenerator - ==========================准备生成文件...==========================
Exception in thread "main" java.lang.NoClassDefFoundError: freemarker/template/Configuration
at com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine.init(FreemarkerTemplateEngine.java:41)
at com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine.init(FreemarkerTemplateEngine.java:34)
at com.baomidou.mybatisplus.generator.AutoGenerator.execute(AutoGenerator.java:103)
at com.dream.road.CodeGenerator.main(CodeGenerator.java:136)
Caused by: java.lang.ClassNotFoundException: freemarker.template.Configuration
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Solution:
Dependencies that need to be imported for automatic code generation
<!--mybatis-plus automatically generates code-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.28</version>
<scope>compile</scope>
</dependency>
Read More:
- IntelliJ idea automatically generates serialVersionUID
- Mybatis automatically generated SQL error
- Vscode automatically formats the code when an error is reported
- Configure eslint in vscode to automatically repair and save the code
- Solve the problem that Windows 7 cannot be updated automatically_ Prompt error code 80246008
- Error: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2
- Failed to retrieve plugin descriptor for org.mybatis.generator :mybatis-generator
- Mybatis openSession.commit () manually submit data and openSession.commit (true) automatically submit data
- The jar package download of Maven project appears (could not transfer artifact. Org mybatis:mybatis )
- “Sh: dot: not found” when Doxygen generates documents
- Springboot integrated with mybatis
- [Solved] Unit test automatically injects error reporting nullpointer
- Pandas generates new columns through LOC
- Httprunner v3. X generates HTML report in assure format
- Python generates (x, y, z) 3D coordinate sequence
- IntelliJ idea / eclipse automatically generate author annotation signature
- Mybatis idea environment integration jar package
- When idea generates a spring boot project, error: read timed out appears
- Wsimport generates WebService client error [error] can’t connect to socks proxy:http
- After vscode installs ts, TSC compiles and generates JS, and an error is reported (repeated variables, etc.)