Java Spring - Unknown application properties

已回答

Hi Team,

 

IDEA can't find a link between application properties from application.properties file and theirs encounters within source code.

It fails with:

- Attribute annotation @Value("${some.property}")

- Class annotation @ConfigurationProperties(prefix = "something")

 

Is it broken or I have uninstalled a plugin or something else?

 

IntelliJ IDEA 2020.1.2 (Ultimate Edition)
Build #IU-201.7846.76, built on June 1, 2020
Runtime version: 11.0.7+10-b765.53 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.5
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 16
Non-Bundled Plugins: org.sonarlint.idea

0

As a general troubleshooting step, try File | Invalidate Caches | Invalidate and Restart.

If the issue remains, please provide a sample project illustrating the problem. You can share it privately here https://uploads.jetbrains.com/

0

Konstantin Annikov

Thank you - I have invalidated caches with restart - it helped.

0

Konstantin Annikov

 

Sorry for the chasing. No the invalidation and restart didn't help me. After indexing - it still does not find properties.

Small project - 2020_07_02_AaWaScN255W4SzNP

 

 

0

All is working fine on my side. Just one notification described here: https://stackoverflow.com/questions/61368900/how-to-configure-for-spring-boot-configuration-annotation-processor-using-confi

 

So, it is a cache/local settings. Try removing (after backing up) .idea directory and .iml file in the project's root. Also, try 'File | Manage IDE Settings | Restore Default Settings" if the first step does not help. 

0

Konstantin Annikov

Thank you, it was an issue with plugin. I was forced to disable a set of plugins when was looking for an issue with freezings and hangs (real issue was with JRE version). Once enabled a set of plugins (not sure which one was mandatory) - now it works.

0

请先登录再写评论。