[Solved] Error:(3, 46) java: Program Package org.springframework.context.annotation does not exist

This bug should only appear in idea2020
Error:(3, 46) java: Program Package org.springframework.context.annotation does not exist

First, open the file in the upper left corner of the idea, and then click settings

Then click build, execution, deployment > Build Tools > Maven > Runner
check delegate ide build/run actions to Maven

The problem will be solved easily
in addition, warm tips: only idea2020 will have this error, and there are many hidden bugs in 2020. It is recommended to upgrade to idea2021 as soon as possible

Read More: