Intellij Idea Structural Replacement (replacing autowired annotation)

74 Views Asked by At

I wonder whether it's possible to replace all the Autowired fields with final ones and @RequiredArgsConstructor below the class declaration?

For instance, replace the following code

public class Controller {

    @Autowired
    private Reposiroty repository;

    @Autowired
    private Service service;

...

}

with something like that:

@RequiredArgsConstructor
public class Controller {

    private final Reposiroty repository;


    private final Service service;

...

}

Thanks in advance!

0

There are 0 best solutions below