Skip to content

[bean completion proposals] assignment in constructor not generated #1497

Closed
@martinlippert

Description

@martinlippert

I have a class that looks like this:

@RestController
public class MyController {

    MyController(TestBean1 testBean1) {
    }

    @GetMapping("/greeting")
    public String sayHello() {
        this.testBean1<*>
        return "Hello Greeting";
    }

}

When I invoke the bean completion for a bean with name testBean1 of type TestBean1, the field is generated, but not the assignment inside of the constructor. The result looks like:

@RestController
public class MyController {

    private final TestBean1 testBean1;

    MyController(final TestBean1 testBean1) {
    }

    @GetMapping("/greeting")
    public String sayHello() {
        this.testBean1<*>
        return "Hello Greeting";
    }

}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions