我需要用shell脚本或任何其他更好的方法替换所有Java实体中的一行代码。
需要更换:
@SequenceGenerator(name = "sequence", sequenceName = "sequence_name", allocationSize = 1)
附:
@GeneratedValue(strategy = GenerationType.IDENTITY)
使用Notepad ++等文本编辑器执行此操作,打开所有Java实体并对所有打开的实体进行更改。
如果您可以使用bash,这个链接可能对您有用
链接:How to do a recursive find/replace of a string with awk or sed?
find /home/www -type f -print0 | xargs -0 sed -i 's/subdomainA\.example\.com/subdomainB.example.com/g'
你需要重新加入你的琴弦。