@EntityListeners(AuditingEntityListener.class)
есть над entity? public static void main(String[] args) {
String json = "{text\": \"Hello {0} World {1} This is {2} test text\"}";
List<String> params = Arrays.asList("v1", "v2", "v3");
for (int i = 0; ; i++) {
String template = String.format("{%s}", i);
if (json.contains(template)) {
json = json.replace(template, params.get(i));
} else {
break;
}
}
System.out.println("Result: \n" + json);
}