The solution of importing idea: cannot resolve symbol ‘log’ when running someone else’s project (halo blog system)
When importing other people’s projects, the log will report an error and prompt cannot resolve symbol ‘log’. After online query, you can install the Lombok plug-in. Here’s what the Lombok plug-in does.
The official introduction is as follows:
Project Lombok makes java a spicier language by adding 'handlers' that know how to build and compile simple, boilerplate-free, not-quite-java code.
Lombok can make Java concise and fast by adding some “handlers”.
About Lombok:
Lombok can simplify java code in the form of simple annotations and improve the development efficiency of developers. For example, JavaBeans often need to be written in development. They need to spend time to add corresponding getter/setter, and maybe also need to write constructor, equals and other methods. Moreover, they need to be maintained. When there are many attributes, there will be a large number of getter/setter methods, which are very lengthy and not too technical. Once the attributes are modified, it is easy to forget to modify the corresponding methods.
Lombok can automatically generate constructor, getter/setter, equals, hashcode and toString methods for attributes at compile time through annotation. The magic is that there are no getter and setter methods in the source code, but there are getter and setter methods in the bytecode file generated by compilation. This saves the trouble of manually rebuilding the code and makes it look simpler.
terms of settlement:
1.1ctrl + Alt + s open Settings
Search or directly select plugins and search Lombok installation in the marketplace
After installation, as shown in the figure
After recompiling, you can run the project, and the log error disappears
Read More:
- django.db.utils .IntegrityError: NOT NULL constraint failed: blog_ blog.author_ ID error resolution
- Solve the problem of error running xxxapplication command line is too long when compiling and running IntelliJ idea
- Idea running error running ‘application’: solution to command line is too long
- In idea, @ slf4j is used to report an error, but log is not found
- When the spring MVC project is running on idea, an error is reported when the controller is a null pointer
- SRS is started normally and there is no screen for streaming. Look at the SRS log and report an error SRS is already running
- Idea: error running Name: command line is too long
- [solution] the system is running in low graphics mode
- Idea2021 reports an error. Default operand size is 64 sets the startup task to automatically add the registry
- Idea for Mac setting JVM running parameters to solve running stuck problem
- When idea executes the command, an error is reported: CreateProcess error = 2. The system cannot find the specified file
- When a system is deployed on weblogic12.2.1.3, it reports an error “IllegalStateException zip file closed”. When it is deployed on weblogic12.2.1.2, it does not report an error and can be accessed normally.
- Nginx reports 502 error, log connect() failed (111: Connection refused) while connecting to upstream. A personal effective solution
- A little bug of CSDN blog
- Error report of windows system running UMI project
- Because the computer is stuck, force to restart the computer and open idea idea to report an error on line 1: no content is allowed in the foreword.
- Centos7 forgot the root password and could not log in to the system
- Perfect solution for IntelliJ idea error “CreateProcess error = 2, system cannot find the specified file”
- After NPM run dev is running, the browser does not respond and reports an error in. / ~ / Babel loader / lib! / ~ / Vue loader / lib/ selector.js?type=script&in
- Brief introduction of idea Lombok and solutions for reporting red and wrong