您好,欢迎来到意榕旅游网。
搜索
您的当前位置:首页java springboot环境搭建

java springboot环境搭建

来源:意榕旅游网

方式一,利用开发工具搭建
new project,选择Spring Initializr,直接next就行了

package com.zr.controller;

import com.zr.bean.User;
import com.zr.service.UserService;
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;

import java.util.List;

@Controller
@ResponseBody
@RequestMapping("hello")
public class HelloSpringboot {
    @RequestMapping("s")
    public String hello(){
        return "hello springboot";
    }
 }

运行springbootapplication,右键 run spingbootapplication

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- yrrf.cn 版权所有 赣ICP备2024042794号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务