IntelliJ / Spring: Properties hint wrong and no recommendations
已回答
given following properties:
// TestProperties.class
@Configuration
@ConfigurationProperties(prefix = "test.props")
public class TestProperties {
protected OrderProperties order = new OrderProperties();
public OrderProperties getOrder() {
return order;
}
public void setOrder(OrderProperties order) {
this.order = order;
}
}with
// OrderProperties.class
public class OrderProperties {
protected OrderMode mode;
public OrderProperties() {
this.mode = OrderMode.DISABLED;
}
public OrderMode getMode() {
return this.mode;
}
public void setMode(OrderMode mode) {
this.mode = mode;
}
}and
// OrderMode.class
public enum OrderMode {
DISABLED,
ENABLED;
OrderMode() {
}
}
then intellij says the not correct property would be correct (no hint):
and the correct property would be incorrect (hint)

And i also dont get any auto suggestions for the property like “disabled” or “enabled” but OrderMode is an enum
请先登录再写评论。
Hello,
Thanks for the report. It looks like a bug on our side. Please follow the issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-343867.