SpringBoot2 仿B站高性能前端+后端项目[24年3月完结16章]

双寿
• 阅读 100

资料地址1:https://pan.baidu.com/s/1MjPC3nZ9pN8LMI80PK5gTQ 提取码: q92d 资料地址2:https://share.weiyun.com/OZdRCg4X 密码:a8wnmx

Spring能做什么 Spring具有哪些能力呢?这点在Spring的官网上有比较详情的描述,我们可以在Spring的项目 里看到Spring的生态涵盖了web开发、数据访问、安全控制、分布式、消息服务、移动开发、批处理等等

SpringBoot优点 SpringBoot的优点我可以在 https://spring.io/projects/spring-boot 这里看到,下面我把优点复制过来了如下: ● Create stand-alone Spring applications ○ 创建独立Spring应用 ● Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files) ○ 内嵌web服务器 ● Provide opinionated ‘starter’ dependencies to simplify your build configuration ○ 自动starter依赖,简化构建配置 ● Automatically configure Spring and 3rd party libraries whenever possible ○ 自动配置Spring以及第三方功能 ● Provide production-ready features such as metrics, health checks, and externalized configuration ○ 提供生产级别的监控、健康检查及外部化配置 ● Absolutely no code generation and no requirement for XML configuration ○ 无代码生成、无需编写XML

SpringBoot是整合Spring技术栈的一站式框架 SpringBoot是简化Spring技术栈的快速开发脚手架

在Spring Boot项目中,正常来说是不存在XML配置,这是因为Spring Boot不推荐使用XML,注意,排不支持,Spring Boot推荐开发者使用Java配置来搭建框架, Spring Boot中,大量的自动化配置都是通过Java配置来实现的,这一套实现方案,我们也可以自己做,即自己也可以使用纯Java来搭建一个SSM环境,即在项目中,不存在任何XML配置,包括web.xml。

下面我们开始代码实战: 创建maven工程 引入依赖 org.springframework.boot spring-boot-starter-parent 2.3.4.RELEASE

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

</dependencies>

创建主程序 /**

  • 主程序类

  • @SpringBootApplication:这是一个SpringBoot应用

  • / @SpringBootApplication public class MainApplication {

    public static void main(String[] args) {

      SpringApplication.run(MainApplication.class,args);

    } } 启动类, 启动就可以了 package com.urthink.upfs.springbootdemo;

import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication public class SpringBootDemoApplication {

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

}

我们将这个依赖拷贝到我们自己的项目pom文件里,粘贴后的pom文件如下 4.0.0

<groupId>com.atguigu</groupId>
<artifactId>boot-01-helloworld</artifactId>
<version>1.0-SNAPSHOT</version>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.4.RELEASE</version>
</parent>
<dependencies>
   <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
</dependencies>
点赞
收藏
评论区
推荐文章
荀勗 荀勗
5个月前
首个基于Transformer的分割检测+视觉大模型视频课程(附源码+课件)
参考资料地址1:https://pan.baidu.com/s/14g2VTg8JeeZ0pDey7xwGg提取码:2bmp参考资料地址2:https://share.weiyun.com/tnVNHGMD密码:3fj7iy众所周知,视觉系统对于理解和推理
荀勗 荀勗
5个月前
高性能多级网关与多级缓存架构落地实战(完结+附电子书)
参考资料地址1:https://pan.baidu.com/s/12w0TT26aywnoIcogPg8Uw提取码:uzf4参考资料地址2:https://share.weiyun.com/SNltUNLW密码:zi3dc7什么是网关?网关(Gateway
赵颜 赵颜
5个月前
[16章]SpringBoot2 仿B站高性能前端+后端项目(2023新版)
资料地址1:https://pan.baidu.com/s/1cxQDKIi7iu1mGmjRr9a0Mw提取码:tz5s资料地址2:https://pan.baidu.com/s/1DjmuC6Id4oUCNVbxfgcMg提取码:qtf3今天给大家讲讲
荀勗 荀勗
4个月前
[新版16章+电子书]SpringBoot+Vue3 项目实战,打造企业级在线办公系统
参考资料地址1:https://pan.baidu.com/s/1KmJP0OPD5P6iHlT7G1MIw提取码:4wyi参考资料地址2:https://share.weiyun.com/jVSDdcBU密码:cruqf9一个完整的在线办公系统具备哪些功
吉太 吉太
4个月前
[2023新版16章]SpringBoot+Vue3 项目实战,打造企业级在线办公系统
参考资料地址1:https://pan.baidu.com/s/1ZJGS0SA9pIUr76VUXioNSg提取码:95bd参考资料地址2:https://share.weiyun.com/jVSDdcBU密码:cruqf9SpringBootVue3
荀勗 荀勗
4个月前
Java主流分布式解决方案多场景设计与实战(完结26章)
资料下载地址1:https://pan.baidu.com/s/1hKQFuPt08YtSSsUDX5JEA提取码:swhy资料下载地址2:https://share.weiyun.com/KXInzo28密码:85dqf9目前主流的Java分布式框架有哪
赵嬷嬷 赵嬷嬷
4个月前
[完结10章]Vue3+Pinia+Vite+TS 还原高性能外卖APP项目
参考资料地址1:https://pan.baidu.com/s/1u0uNBMkOA2NRk3N6myb4Zg提取码:tnlt参考资料地址2:https://share.weiyun.com/Wjw3QpeQ密码:gxrfcwVue3带来的改变,除了其自身
吉太 吉太
1个月前
新版React18+Next.js14+Nest.js全栈开发复杂低代码项目[21章]
资料地址1:https://pan.baidu.com/s/1CpBiE0X4vq9dAoZZCow0bw提取码:wwq9资料地址2:https://share.weiyun.com/vXd3qr0O密码:bcrymy2024版,React18Nest.
鲍二家的 鲍二家的
1个月前
[完结17章]SpringBoot3+Vue3 开发高并发秒杀抢购系统
学习地址1:https://pan.baidu.com/s/1DRZXkQeGkrPwhVTd2ko00g提取码:gpwn学习地址2:https://share.weiyun.com/ysK13sR2密码:74m96t众所周知,作为开发新手,入行、实习、转
鲍二家的 鲍二家的
1个月前
[完结12章]AI Agent智能应用从0到1定制开发
资料地址1:https://pan.baidu.com/s/19YsA0yYI3Q9ebr3iFSJBw提取码:hvhu资料地址2:https://share.weiyun.com/NfCB6NdF密码:rhame3AIAgent已成为企业在构建智能化的定