Cleaning
This commit is contained in:
parent
a8c8ec1bf8
commit
aacaa682bc
@ -12,35 +12,4 @@ public class DemoApplication {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(DemoApplication.class, args);
|
SpringApplication.run(DemoApplication.class, args);
|
||||||
}
|
}
|
||||||
@GetMapping("/hello")
|
|
||||||
public String hello(@RequestParam(value = "name", defaultValue = "World") String name) {
|
|
||||||
return String.format("Hello %s!", name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/sum")
|
|
||||||
public String Sum(@RequestParam(defaultValue = "0") double first,
|
|
||||||
@RequestParam(defaultValue = "0") double second) {
|
|
||||||
return Double.toString(first + second);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/minus")
|
|
||||||
public String Ras(@RequestParam(defaultValue = "0") double first,
|
|
||||||
@RequestParam(defaultValue = "0") double second) {
|
|
||||||
return Double.toString(first - second);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/multi")
|
|
||||||
public String Pros(@RequestParam(defaultValue = "1") double first,
|
|
||||||
@RequestParam(defaultValue = "1") double second) {
|
|
||||||
return Double.toString(first * second);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/div")
|
|
||||||
public String Del(@RequestParam(defaultValue = "1") double first,
|
|
||||||
@RequestParam(defaultValue = "1") double second) {
|
|
||||||
if (second == 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return Double.toString(first / second);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package method.service;
|
package method.service;
|
||||||
|
|
||||||
import ip.labwork.method.domain.IMethod;
|
import method.domain.IMethod;
|
||||||
import ip.labwork.method.domain.MethodString;
|
import method.domain.MethodString;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user