sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

Inject a bean completion proposal

Open BoykoAlex opened this issue 1 year ago • 2 comments

Inject a bean via "member" completion proposal. See https://blog.jetbrains.com/idea/2024/02/intellij-idea-2024-1-eap-5/#enhanced-bean-completion-and-autowiring-for-spring

For example:

@RestController
class RestApi {
String hello() {
  return repo<^>
}

Should propose beans with id's/types starting with repo for example. Completion proposal application would add a field, a constructor injected parameter, create the constructor if necessary or perhaps make the field autowired if constructors are created and none look like an autowired constructor.

BoykoAlex avatar Feb 23 '24 15:02 BoykoAlex