软件为sts软件

1.新建项目

2.工程名称

3.选择依赖项,可以在搜索框中搜索

4.添加端口号

5.创建controller

6.创建controller类,并输入一下内容

package com.example.demo.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("/")
public class controller {
@Autowired @RequestMapping("")
public String index() {
System.out.println("index");
return "login";
} }

7.创建前端文件 ,并输入以下代码

<!DOCTYPE html>
<html>
<head>
<meta charset="BIG5" />
<title>Insert title here</title>
</head>
<body>
hello world!
<p>1231</p>
</body>
</html>

8.在浏览器中输入 http://localhost:8088/ ,因为设置的端口号是8088

成功创建

maven管理

新建Springboot项目的更多相关文章

  1. 一、新建springBoot项目

    三种方式新建SpringBoot项目:  官网,  myeclipse,  idea 1.官方网站新建(https://start.spring.io/) 1)打开官网,选择自己需要的springBo ...

  2. 新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo

    新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo ...

  3. IDEA中新建SpringBoot项目时提示:Artifact contains illegal characters

    场景 一步一步教你在IEDA中快速搭建SpringBoot项目: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/87688277 ...

  4. idea新建springboot项目

    不多说废话,直接进入正题,按照下面的步骤创建一个springboot项目一般不会出错,当然不排除可能会有一些脸黑的,不过应该问题不大. 第一步,如果你是在已有的项目里面,新建一个springboot项 ...

  5. 新建SpringBoot项目报错

    新建一个Springboot项目时,当勾选了SQL相关的依赖(如引入了jpa 或MyBatis依赖),直接启动项目时报错 原因:没有配置数据库相关的属性,如 url driver 等 解决办法:在ap ...

  6. 使用IntelliJ Idea新建SpringBoot项目

    简单给大家介绍一下我来创建SpringBoot项目使用的工具,本人使用IntelliJ Idea来创建项目,利用其中的Spring Initializr工具来快速创建项目. 步骤如下: 菜单栏中选择F ...

  7. 新建springboot项目启动出错 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

    错误信息入下: 2018-06-23 01:48:05.275 INFO 7104 --- [ main] o.apache.catalina.core.StandardService : Stopp ...

  8. SpringBoot入门,新建SpringBoot项目

    一.在Spring Initializr中创建初始化项目 https://start.spring.io/ 二.通过maven导入Idea中(解压后的项目) 解压文件 黄色的为项目需要的真正的代码 , ...

  9. 使用STS4新建springboot项目

    1.配置maven,自定义setting文件和仓库,一定要用阿里云镜像地址下载依赖,官方太坑了,整了半天都没弄好,原来是下载太慢文件损坏 <mirror> <id>alimav ...

随机推荐

  1. 详解C++ STL priority_queue 容器

    详解C++ STL priority_queue 容器 本篇随笔简单介绍一下\(C++STL\)中\(priority_queue\)容器的使用方法和常见的使用技巧. priority_queue容器 ...

  2. 20191102 「HZOJ NOIP2019 Round #12」20191102模拟

    先开坑. md原题写挂我也真是... 100+20+10 白夜 打表大法吼 显然,不在环上的点对答案的贡献是 \((k-cycle)^{k-1}\) . 打表得到环上的递推式,矩阵一下乘起来就好了. ...

  3. 历届试题 青蛙跳杯子-(bfs)

    题目:http://lx.lanqiao.cn/problem.page?gpid=T448 题意:有两个字符串例如*WWBB和WWBB*,*每次能往左或右跳1-3步,与原位置的字符交换,问最少步数跳 ...

  4. jQuery与IE兼容性问题处理

    jQuery虽然是兼容所有主流的浏览器,但实际应用中也会存在很多兼容性的问题.使用IE11+jquery-3.2.1.min.js遇到的问题如: 对象不支持indexOf 在低版本中,1.8写法如下: ...

  5. web.xml引入 xml (tomcat 7.0.52) 以上版本报错

    原文地址:https://blog.csdn.net/sdmxdzb/article/details/47728017?locationNum=11 今天在搞工作流,tomcat7.0.57 总是报错 ...

  6. mybatis使用collection查询集合属性规则

    接上篇mybatis使用associaton进行分步查询 相关的类还是上篇中的类. 查询部门的时候将部门对应的所有员工信息也查询出来 DepartmentMapper.xml <!--嵌套结果集 ...

  7. js生成条形码

    生成条形码 <body> <div> <img id="ma"/> </div> </body> </html&g ...

  8. CentOS7安装Oracle 11g数据库

    转载:https://blog.csdn.net/lia17/article/details/82256565 rpm -ivh --force --nodeps *.rpm 强制装 rpm依赖包下载 ...

  9. SpringBoot入门-SpringBoot性能优化

    SpringBoot启动优化 显示声明扫包范围: 即不使用@SpringBootApplication默认扫包,使用@ComponentScan(basePackages = { "com. ...

  10. UWP使用TreeView

    这个帖子本来是不想写的,但是感觉网上类似的也没有,对于小白可能有点用,于是想着还是写一下吧. 写之前想说下,UWP其实并没有死掉,对于win10来说,以后的新设备肯定是支持UWP的,而且微软一直在完善 ...