package com.paicaifu.app.web;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by bayin on 2017/2/17.
 */
@RestController
public class HelloController {
    @RequestMapping("/hello")
    public String index() {
        return "Hello World";
    }
}

@@ -87,16 +87,77 @@
 apping;%0A
+import org.springframework.web.bind.annotation.RequestParam;%0A
 import o
@@ -211,16 +211,16 @@
 roller;%0A
-
 %0A/**%0A * 
@@ -359,40 +359,556 @@
 dex(
-) %7B%0A        return %22Hello World%22
+@RequestParam(%22a%22) int a, @RequestParam(%22b%22) int b) %7B%0A        int c = a + b;%0A        return String.valueOf(a) + %22+%22 + String.valueOf(b) + %22=%22 + String.valueOf(c);%0A    %7D%0A%0A    @RequestMapping(%22/sqrt%22)%0A    public String sqrt(@RequestParam(%22a%22) String a) %7B%0A        double result, temp;%0A        try %7B%0A            temp = Double.parseDouble(a);%0A        %7D catch (Exception e) %7B%0A            return %22%E5%8F%82%E6%95%B0%E4%BC%A0%E9%80%92%E9%94%99%E8%AF%AF: %22 + a;%0A        %7D%0A        if (Double.parseDouble(a) %3C 0) return %22%E4%B8%8D%E8%83%BD%E4%BC%A0%E8%B4%9F%E6%95%B0: %22 + a;%0A        result = Math.sqrt(temp);%0A%0A        return String.valueOf(result)
 ;%0A  

add plus and sqrt function