开发环境
构建工具:Apache Maven
集成开发工具:IDEA
数据库:MySQL Redis
应用服务器:Apache Tomcat
版本控制工具:Git
搭建开发环境
Apache Maven
可以帮助我们构建项目、管理项目中的jar包
Maven仓库:存放构建的位置
本地仓库:默认是~/.m2/repository ~:家目录 系统盘用户admin
远程仓库:中央仓库、镜像仓库、私服仓库
掌握安装、配置、常用命令
命令: mvn compile 编译
mvn clean 删除
mvn clean compile
mvn clean test
Spring Initializr
创建Spring Boot项目的引导工具
创建Spring Boot项目
Spring Boot核心作用:起步依赖、自动配置、端点监控
碰到的问题:
问题描述: 使用spring initializr创建maven程序, 在intellij idea中打开时报错: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.2.4.RELEASE from https://maven.aliyun.com/repository/central
原因: 我把maven的下载源改成了阿里云, 但是可能是因为阿里云还没有同步一些关键组件
解决方法: 在pom.xml中把spring-boot-starter-parent:pom的版本降到2.1.6就可以了
————————————————
转载自CSDN博主littlehaes
原文链接:https://blog.csdn.net/littlehaes/article/details/104088169
碰到异常:This application has no explicit mapping for /error, so you are seeing this as a fallback.
Application启动类的位置不对.要将Application类放在最外侧,即包含所有子包
原因:spring-boot会自动加载启动类所在包下及其子包下的所有组件.