Commit 960c2eb0 by Patryk Czarnik

@RestController

parent 95e6726a
......@@ -3,17 +3,15 @@ package com.example.demo;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@Controller
@RestController
public class HistoriaJSON {
@Autowired
private LogikaKalkulatora logika;
@GetMapping("/historia.json")
@ResponseBody
public List<String> pokazHistorie() {
// Wynik tej metody powinien zostać odesłany do klienta, nie używamy tu szablonu.
// Można to zapewnić adnotacją @ResponseBody
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment