If you have imported a Maven project into IntelliJ then chances are that IntelliJ is unable to reconcile the project and all your imports will show errors.
In addition IntelliJ will not recognise your pom.xml file:
The way to solve this is by telling IntelliJ that you have imported a Maven project and point it in the right direction.
On your pom.xml file, right click it and then press ‘Add as maven project’:
You may also need to mark your project directory as sources root:
Hopefully this guide solved your problem. If not leave a comment down below and we’ll help you out!