I have created a simple micronaut project using mn cli and followed the steps to generate eclipse project (using gradlew eclipse
)
Everything looks fine however when I create any service and annotate with @Singleton
annotation, Eclipse gives the error for following import statement,
import javax.inject.Singleton
The error is The import javax.inject.Singleton cannot be resolved
However if I use the wildcard import like,
No issues reported by Eclipse.
Please note that despite Eclipse showing the error, the project builds and runs perfectly fine from command line using gradlew run
However it's a hinderance in case if I want to debug the code.
It must be something to do with Eclipse JDT compiler, but I can't figure out.
Any help is appreciated !