springboot

如何创建springboot:记得选择spring web

maven:

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
直接继承父类的方法,版本啥的都在父类中,父类中还有一个父类
以后再看一遍吧,我是很明白

<!--springboot启动项-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!--springboot web搭载了tomcat,xml....-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

还有好玩的springboot banner:
在 resources中整一个banner.txt
                              _.-.
/ 99\
( `\
|\\ , ,|
__ | \\____/
,.--"`-.". / `---'
_.-' '-/ |
_.-" | '-. |_/_
,__.-' _,.--\ \ (( /-\
',_..--' `\ \ \\_ /
`-, ) |\'
| |-.,,-" (
| | `\ `',_
) \ \,(\(\-'
jgs \ `-,_
\_(\-(\`-`
" "
Rex by Joan Stark
启动的时候就直接是个小恐龙,啊哈哈巨好玩

原理:
自动配置:
核心依赖在父工程中

启动器:
本身的启动器,web启动器,text启动器
springboot将

主程序:
@SpringBootApplication是一个spring应用
一个启动



posted @   爽爽子的秃头生活  阅读(25)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!
点击右上角即可分享
微信分享提示