I have a class starting like this:
@Controller
@RequestMapping("/owners/{ownerId}")
@Profile("cloud")
class PetController {
It looks like executing Go To References while clicking on the annotation attributes uses the annotated type as the element to find references for - which should not be the case in my opinion.
Example:
- clicking on
@Controller and executing Go To References shows all references to the Controller type. 👍
- same for
@Profile etc. 👍
- clicking on
PetController and executing Go To References shows all the references to the PetController type. 👍
But:
- clicking on the
"cloud" annotation attribute and executing Go To References shows all the references to the PetController type as well. 😱 This should return no references, I think.
Background:
We have functionality in place in the Spring Tools that finds references to that specific "cloud" attribute in your code, but the results gets merged with references to the PetController type, which is not a great result (at least from what we are trying to achieve) 😀