首页 > 其他分享 >Controller

Controller

时间:2022-12-15 16:36:48浏览次数:25  
标签:web springframework Controller org import annotation

package com.example.controller;
import com.example.model.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody;
/**  * Created by Administrator on 2017/12/20.  */ @Controller public class UserController {     @Autowired     private User user;
    @RequestMapping("/testValue")     @ResponseBody     public String testValue(){         return user.toString();     } }

标签:web,springframework,Controller,org,import,annotation
From: https://www.cnblogs.com/cnetsa/p/16985353.html

相关文章