Spring Boot学到的内容

2023-05-24,,

    Hello World:了解程序入口(创建启动类)
    Web程序:写Controller类(@RestController),写Controller方法(@GetMapping),maven依赖spring-boot-starter-web。
    热部署:修改Java类、配置文件自动刷新部署,intellij idea配置自动编译Settings->Compiler->Build project automatically,Ctrl+Shift+Alt+/->Registry->勾选compiler.automake.allow.when.app.running。
    多环境切换:开发(dev)、测试(test)、生产(prod)使用不同配置,在application.properties配置spring.profiles.active指定激活哪个环境配置。
    日志配置:logback-spring.xml,根据多环境切换打印不同日志。
    打包:打成jar包内置了tomcat,打成war包可以放入tomcat运行。

参考博客:https://www.cnblogs.com/moonlightL/p/7891803.html

Spring Boot学到内容的相关教程结束。

《Spring Boot学到的内容.doc》

下载本文的Word格式文档,以方便收藏与打印。