spring boot如何返回json数据?
网友回复
将controller的注解改成@RestController,示例
import com.example.demo.User; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation....
点击查看剩余70%