Промежуточное сохранение.
This commit is contained in:
parent
0a6aae0887
commit
9fa259f81d
@ -3,14 +3,29 @@ import React, { useEffect } from 'react';
|
||||
function App() {
|
||||
|
||||
useEffect(() =>{
|
||||
fetch('http:/localhost:8080/String')
|
||||
fetch('http:/localhost:8080')
|
||||
.then(response => response.text())
|
||||
.then(result => console.log(result))
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
|
||||
<div for="number_one">Введите первое число:</div>
|
||||
<input id="number_one"></input>
|
||||
|
||||
<div for="number_two">Введите второе число:</div>
|
||||
<input id="number_two"></input>
|
||||
|
||||
<div>
|
||||
<button id="Sum">+</button>
|
||||
<button id="Minus">-</button>
|
||||
<button id="Division">/</button>
|
||||
<button id="Multiplication">x</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Итог: {}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -14,8 +14,27 @@ public class SpringOnlineCalculatorApplication {
|
||||
SpringApplication.run(SpringOnlineCalculatorApplication.class, args);
|
||||
}
|
||||
|
||||
/*@CrossOrigin
|
||||
@GetMapping("/String")
|
||||
public String PrintName(@RequestParam(value="Егор", defaultValue = "Егор") String str) {
|
||||
public Integer Sum(@RequestParam(Integer value_one, defaultValue = "Егор") String str) {
|
||||
return String.format("Привет, %s!", str);
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@GetMapping("/String")
|
||||
public Integer Minus(@RequestParam(value="Егор", defaultValue = "Егор") String str) {
|
||||
return String.format("Привет, %s!", str);
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@GetMapping("/String")
|
||||
public Integer Implements(@RequestParam(value="Егор", defaultValue = "Егор") String str) {
|
||||
return String.format("Привет, %s!", str);
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@GetMapping("/String")
|
||||
public Integer Multiplication(@RequestParam(value="Егор", defaultValue = "Егор") String str) {
|
||||
return String.format("Привет, %s!", str);
|
||||
}*/
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user