I've recently installed the plugin "spring boot assistant" into my Intellij. When I was trying to run an old java file that I've completed before, a lot of the symbols were displayed as "cannot resolve symbol".
This is what my file looks like.
I think this might have something to do with maven, but I dont know how to fix it since there's no errors with running the program before installing spring-boot and maven. I've just started learning spring boot so I'm still unfamiliar with the functions. Please help me.
You can try invalidating the cache and restarting IntelliJ, in many cases it will help. After "Invalidate Caches/Restart", you have to wait for re-index when you open any project!
IntelliJ IDEA creates and executes the Spring Boot run configuration.
Ever since copying a Gradle project from one computer to another I have been getting 'cannot resolve symbol String' and similar messages in IntelliJ. Listed below are steps which *may* fix the problem: Invalidate and refresh the IntelliJ's caches File Menu -> Invalidate Caches / Restart Project SDK selection
When we're injecting runtime properties into our Spring applications, we may define bean classes for groups of custom properties. IntelliJ provides help and auto-complete for the built-in properties beans. However, it needs a little help to provide these for custom properties.
Put your mouse over and press ⌥ Option + Enter, then click on Add library... (most of the cases the first option); and if still you see the error, cannot resolve @SpringBootApplication
It might be because IntelliJ hasn’t correctly recognised the project as a Maven project. To confirm this, have a look at the pom.xml file icon. If it’s just shown as a normal XML icon like this: Then you’ll need to specifically tell IntelliJ to read the file as a Maven project, by right-clicking the pom.xml file and choosing this option:
Some plugins might mess up with the project settings. First of all, try to invalidate cache: File
-> Invalidate Caches / Restart...
. Confirm with Invalidate and Restart
. It takes a while but is worth a try.
If it doesn't work your SDK is not set: Open File
-> Project Structure...
and navigate to Project
and add a Project SDK and the Project language level you need (you might want to navigate to your SDK saved in the system instead).
It is also worth to try checking up the language levels:
File
-> Project Structure...
and navigate to Modules
.
Check the Language level
of each module.
File
-> Settings
and navigate to Build, Execution, Deployment
-> Java Compiler
.
Check the Target bytecode version
of each module.
It seems to have issues with resolving absolutely basic Java stuff - try going into Project Structure -> Project Settings -> Project
and check if you have an SDK defined for your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With