Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable showing the value of a Spring @Value annotation in IntelliJ IDEA?

I am running IntelliJ IDEA 2017.3.4 (Ultimate Edition). I have a Spring Boot project, with Spring properties defined that will get autowired into @Value-annotated fields in an @Component class. The properties are defined in application.properties.

By default, IntelliJ is displaying the value of the variable instead of the actual variable expression (with a color scheme to make it obvious that this is not the actual value in there). Clicking on the value will reveal the actual variable expression.

For instance:

@Value("${my.property.value}")
private String myProperty;

would be displayed as the following, if "my.property.value" resolved to "theValue":

@Value("theValue")
private String myProperty;

I would rather it not do this. Is there a preference to disable this? I have not had luck finding an answer searching the IDEA preferences or online.

like image 574
M. Justin Avatar asked Mar 09 '18 21:03

M. Justin


1 Answers

In Settings(Preferences on Mac) | Editor | General | Code Folding disable the option I18 strings.

This folding feature is not related to Spring specifically.

like image 152
Andrey Avatar answered Oct 19 '22 10:10

Andrey