문제

I created a structured search and replace, using this search string:

protected $FieldType$ $FieldName$;

and this replace string:

private $FieldType$ $FieldName$;

to replace, for example, this:

@Autowired
protected JdbcTemplate jdbcTemplate;

with:

@Autowired
private JdbcTemplate jdbcTemplate;

However, the result is this:

private JdbcTemplate jdbcTemplate;

That is, the annotation goes away. How do I avoid this? The code base has many protected fields with various annotations, and I want to leave them untouched whatever they are.

도움이 되었습니까?

해결책

It turns out this was a bug in Structural Search & Replace.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top