Spring boot源码编译

Date: 10/01/2022

README.adoc

编译代码

./gradlew build

导入idea

现有代码中的参考。
spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-jpa\src\main\java\smoketest\jpa\SampleJpaApplication.java

第一个测试用例

import org.springframework.boot.*;
import org.springframework.boot.autoconfigure.*;
import org.springframework.web.bind.annotation.*;

@RestController
@SpringBootApplication
public class Example {

	@RequestMapping("/")
	String home() {
		return "Hello World!";
	}

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

}

Required: JDK17和Kotlin1.7

JDK17需要 IntelliJ IDEA 2022.2.2

== Building from Source
You don’t need to build from source to use Spring Boot (binaries in https://repo.spring.io[repo.spring.io]), but if you want to try out the latest and greatest, Spring Boot can be built and published to your local Maven cache using the https://docs.gradle.org/current/userguide/gradle_wrapper.html[Gradle wrapper].
You also need JDK 17.

spring-boot-main/README.adoc
ci/scripts/detect-jdk-updates.sh
java17


spring-boot-main/gradle.properties
kotlinVersion=1.7.10

IDEA设置JDK17和Kotlin1.7

设置项目中JDK17版本
在这里插入图片描述

在这里插入图片描述
设置全局JDK17版本
在这里插入图片描述

Situation: GitHub commit code error!

LF will be replaced by CRLF in git - What is that and is it important? [duplicate]

Method 1

git init
git add .

Method 2

git config core.autocrlf true

Filename too long

Reference:

Kotlin download
https://plugins.jetbrains.com/plugin/6954-kotlin/versions/stable
:docs:
https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference
:github:
https://github.com/spring-projects/spring-boot
Spring Boot Reference Documentationhttps://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/pdf/spring-boot-reference.pdf
LF will be replaced by CRLF in git - What is that and is it important? [duplicate]
https://stackoverflow.com/questions/5834014/lf-will-be-replaced-by-crlf-in-git-what-is-that-and-is-it-important
Git中的“LF will be replaced by CRLF”警告详解
https://blog.csdn.net/taiyangdao/article/details/78629107

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值