gson单例化,另外关掉gson html转义功能

This commit is contained in:
heavyrian2012
2022-08-31 20:24:46 +08:00
parent 97540bdd1b
commit 04c89d1fc1
32 changed files with 75 additions and 54 deletions
@@ -34,7 +34,7 @@ public class VersionAction extends Action {
try {
response.setContent(Utility.formatJson(new Gson().toJson(GitRepositoryState.getGitRepositoryState())));
response.setContent(Utility.formatJson(gson.toJson(GitRepositoryState.getGitRepositoryState())));
} catch (IOException e) {
e.printStackTrace();
response.setContent("{\"version\":\"unknown\"}");