package com.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.security.Principal;

@SpringBootApplication
@Controller
public class UiApplication {

    @RequestMapping("/{[path:[^\\.]*}")
    public String redirect() {
        return "forward:/";
    }

    @RequestMapping("/user")
    public Principal user(Principal user) {
        return user;
    }

    public static void main(String[] args) {
        SpringApplication.run(UiApplication.class, args);
    }
}

@@ -247,16 +247,77 @@
 Mapping;
+%0Aimport org.springframework.web.bind.annotation.ResponseBody;
 %0A%0Aimport
@@ -543,16 +543,34 @@
 /user%22)%0A
+    @ResponseBody%0A
     publ

add a missed annotation