3月18日java学习笔记

构建工具实战

  1. Maven核心配置
    pom.xml依赖管理:
org.springframework.boot spring-boot-starter-web 3.1.0 运行 HTML 镜像加速(修改settings.xml): aliyun https://maven.aliyun.com/repository/public central 运行 HTML 2. Gradle快速入门 构建脚本示例(build.gradle):

plugins {
id 'java'
id 'org.springframework.boot' version '3.1.0'
}

repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
}
常用命令:

gradle build # 编译打包
gradle test # 运行测试
gradle bootRun # 启动Spring Boot应用

posted @ 2025-03-18 21:53  头发少的文不识  阅读(8)  评论(0)    收藏  举报