Add ResponseBody annotation
add ResponseBody annotation to TestController root method to successfully returns hard-coded html page.
This commit is contained in:
parent
f52378a1c7
commit
c106137bdc
@ -4,12 +4,14 @@ package ru.tubryansk.tdms.controller;
|
|||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/")
|
@RequestMapping("/")
|
||||||
public class TestController {
|
public class TestController {
|
||||||
@GetMapping
|
@GetMapping
|
||||||
|
@ResponseBody
|
||||||
public String root() {
|
public String root() {
|
||||||
return """
|
return """
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user