第一个SpringBoot项目
2020-04-02 18:49
387 查看
第一个SpringBoot项目HelloController
搭建指南
参考:https://blog.csdn.net/qq_40147863/article/details/84194493
遇到的问题·
-
import org.springframework.web时,springframework是红的
方案:检查idea中maven路径,file—setting-搜索maven
然后import changes
-
运行DemoApplication.java时,报错:
Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver classIf you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
方案:程序入口替换为
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})
此时,找不到类DataSourceAutoConfiguration.class,点击Alt+Enter可解决 -
浏览器报错404
HelloController忘加@RestController
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- spring boot之创建第一个Spring boot项目
- Spring精藏(一)第一个SpringBoot项目构建及eclipse安装Springboot
- 二、第一个Spring Boot 项目
- 只需两步实现Eclipse+Maven快速构建第一个Spring Boot项目
- IDEA创建第一个springboot项目(1)
- Spring Boot / Spring MVC 入门实践 (一) :环境搭建与第一个项目
- Spring boot学习笔记之一:简介及创建第一个项目
- 从0搭建第一个Spring Boot项目
- spring boot demo 学习(一) eclipse下创建第一个spring boot项目
- 使用IDEA创建第一个SpringBoot项目
- Spring Boot 第一个项目运行问题
- SpringBoot项目创建与第一个示例
- 【Spring boot】第一个项目 Springboot + mysql + hibernate
- springboot学习: 初识Spring Boot框架,搭建第一个项目!
- Springboot 第一个项目(网站资源爬取)--练手吧(再弱弱的问一下怎么上传文件?)
- 002_第一个SpringBoot项目
- 开启第一个spring boot项目
- 详解eclipse下创建第一个spring boot项目
- 快速搭建第一个SpringBoot项目
- Eclipse创建第一个Spring Boot项目