手把手idea搭建springboot web项目,附具体操作和源码下载

HelloController.java中敲入如下代码:

package com.example.demo.controller;

import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.RequestMapping;

@Controller

public class HelloController {

@RequestMapping(“/index”)

public String show(){

return “index”;

}

}

3.新增html页面

==========

index.html文件内容如下:

login

账号:

密码:

4.修改配置

======

pom.xml文件中,新增如下配置:

org.springframework.boot

spring-boot-starter-thymeleaf

如果不加,访问controll中的地址时,就无法跳转到index.html.

5.本地运行及测试

=========

运行日志如下:

Connected to the target VM, address: ‘127.0.0.1:56180’, transport: ‘socket’

.   ____          _            __ _ _

/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

\\/  ___)| |_)| | | | | || (_| |  ) ) ) )

’  |____| .__|_| |_|_| |_\__, | / / / /

=|_|======|___/=/_/_/_/

:: Spring Boot ::                (v2.5.3)

2021-08-10 08:57:03.366  INFO 18020 — [           main] com.example.demo.DemoApplication         : Starting DemoApplication using Java 1.8.0_181 on LAPTOP-FALL with PID 18020 (D:\work\intellijmy\springbootwebdemo\target\classes started by 86183 in D:\work\intellijmy\springbootwebdemo)

2021-08-10 08:57:03.507  INFO 18020 — [           main] com.example.demo.DemoApplication         : No active profile set, falling back to default profiles: default

2021-08-10 08:57:12.517  INFO 18020 — [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)

2021-08-10 08:57:12.577  INFO 18020 — [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]

2021-08-10 08:57:12.577  INFO 18020 — [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.50]

2021-08-10 08:57:13.047  INFO 18020 — [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext

2021-08-10 08:57:13.048  INFO 18020 — [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 8881 ms

2021-08-10 08:57:20.596  INFO 18020 — [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ‘’

2021-08-10 08:57:20.643  INFO 18020 — [           main] com.example.demo.DemoApplication         : Started DemoApplication in 27.756 seconds (JVM running for 42.529)

6.部署到线上

=======

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数前端工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Web前端开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
img
img
img
img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上前端开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新

如果你觉得这些内容对你有帮助,可以添加V获取:vip1024c (备注前端)
img

总结

我在成长过程中也是一路摸爬滚打,没有任何人的指点,所以走的很艰难。例如在大三的时候,如果有个学长可以阶段性的指点一二,如果有已经工作的师兄可以告诉我工作上需要什么,我应该前面的三年可以缩短一半;后来去面试bat,失败了有5、6次,每次也不知道具体是什么原因,都是靠面试回忆去猜测可能是哪方面的问题,回来学习和完善,当你真正去招人的时候,你就会知道面试记录是多么重要,面试官可以从面试记录里看到你的成长,总是去面试,总是没有成长,就会被定义为缺乏潜力。

CodeChina开源项目:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

image
5、6次,每次也不知道具体是什么原因,都是靠面试回忆去猜测可能是哪方面的问题,回来学习和完善,当你真正去招人的时候,你就会知道面试记录是多么重要,面试官可以从面试记录里看到你的成长,总是去面试,总是没有成长,就会被定义为缺乏潜力。

CodeChina开源项目:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

[外链图片转存中…(img-czXzM3CO-1711861785998)]
image

  • 25
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在IDEA搭建Spring Cloud Alibaba项目,你需要按照以下步骤进行操作: 1. 创建一个新的Spring Boot项目。在IDEA中,选择"File" -> "New" -> "Project",然后选择"Spring Initializr"作为项目类型。填写项目的基本信息,包括项目名称、项目位置等。 2. 在"Dependencies"选项卡中,添加Spring Cloud Alibaba的相关依赖。根据你的需求,可以添加以下依赖: - 引用\[1\]中的依赖:`com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config` - 引用\[2\]中的依赖:`com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel` - 引用\[3\]中的依赖:`com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel` 3. 点击"Next",选择项目的其他配置,如项目的Java版本、项目的包结构等。 4. 点击"Finish",完成项目的创建。 现在,你已经成功搭建了一个Spring Cloud Alibaba项目。你可以根据自己的需求进行进一步的开发和配置。 #### 引用[.reference_title] - *1* *2* [手把手教你在 IDEA 中创建一个 Spring Cloud Alibaba 工程(一)](https://blog.csdn.net/u010101193/article/details/121786086)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [idea 搭建springcloud+springcloud alibaba项目(maven)](https://blog.csdn.net/Helloworld_pang/article/details/108381930)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值