From 37b175eb80e4c907b51f9aeaf95fa8efdfbd7fe2 Mon Sep 17 00:00:00 2001 From: TangBean <984354469@qq.com> Date: Sun, 24 Feb 2019 11:04:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E8=B5=B7=E5=A7=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/olexec/controller/RunCodeController.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/olexec/controller/RunCodeController.java b/src/main/java/org/olexec/controller/RunCodeController.java index c8304bc..7424c5c 100644 --- a/src/main/java/org/olexec/controller/RunCodeController.java +++ b/src/main/java/org/olexec/controller/RunCodeController.java @@ -17,8 +17,15 @@ public class RunCodeController { @Autowired private ExecuteStringSourceService executeStringSourceService; + private static final String defaultSource = "public class Run {\n" + + " public static void main(String[] args) {\n" + + " \n" + + " }\n" + + "}"; + @RequestMapping(path = {"/"}, method = RequestMethod.GET) - public String entry() { + public String entry(Model model) { + model.addAttribute("lastSource", defaultSource); return "ide"; }