后端springboot上传Git

1.hello,world

准备

专业版(教育账户)(已申请)

maven

jdk

idea

gitee:Gitee - 基于 Git 的代码托管和研发协作平台

开始

创建完成后在目录里规范一下

在启动项内实验一下能不能启动和打印

代码

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


// Generated by https://start.springboot.io
// 优质的 spring/boot/data/security/cloud 框架中文文档尽在 => https://springdoc.cn
@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
		System.out.println("你好springboot");

		SpringApplication.run(DemoApplication.class, args);
	}

}

成功

新增comtroller(控制器)

代码

package com.example.demo.comtroller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @RequestMapping(value = "hello", method = {RequestMethod.GET})
    public String hello(){
        return "hello world";
    }
}

成功

推送入gitee仓库

参考CSDN本地springboot项目上传git管理-CSDN博客

步骤:

1.创建仓库

2.复制路径

3.进入项目搜索Git找到安装路径设置它

VCS创建git

提交一下

然后定义远程管理 复制路径登录

找出要推送的地方

点击推送就ok

成功推送

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值