Skip to content

Commit

Permalink
给起始页面添加默认代码
Browse files Browse the repository at this point in the history
  • Loading branch information
TangBean committed Feb 24, 2019
1 parent d94d42b commit 37b175e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/org/olexec/controller/RunCodeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down

0 comments on commit 37b175e

Please sign in to comment.