SpringBoot项目启动
SpringBoot项目与其他项目启动方式有些不同。
查看是否是SpringBoot项目,可以查看在项目的pom.xml中是否有引入SpringBoot:

上图中就是对应的spring-boot。若有则为springboot项目。
正题:启动springboot项目:
(1)maven install 项目(与其他项目相同,不再赘述)
(2)maven install项目后会发现有一个jar包,如下图中所示:

cmd进入此目录:

直接 java -jar 包名 启动项目。
若无法启动,发现如下提示:

这是因为80端口被占用了。
可以利用如下命令查看是被什么占用了:
netstat -ano|findstr "80" (查看端口被什么占用了,可以其进程的pid)

上图中我们发现PID为3600,下面输入如下命令进行查看是什么进程在占用:
tasklist|findstr "3600"

如果这个进程没有必要需要,大家直接kill pid 就可以了。
但是我这里的这个进程必须要使用,这个时候我们就需要启动的时候去指定端口号了,如下命令:
java -jar xxx.jar --server.port 8080
这样,我们就使用8080端口启动了。
直接使用http://localhost:8080 进行访问即可。
SpringBoot项目启动的更多相关文章
- Springboot 项目启动后执行某些自定义代码
Springboot 项目启动后执行某些自定义代码 Springboot给我们提供了两种"开机启动"某些方法的方式:ApplicationRunner和CommandLineRun ...
- springBoot项目启动类启动无法访问
springBoot项目启动类启动无法访问. 网上也查了一些资料,我这里总结.下不来虚的,也不废话. 解决办法: 1.若是maven项目,则找到右边Maven Projects --->Plug ...
- SpringBoot项目启动时链接数据库很慢
SpringBoot项目启动时链接数据库很慢 springboot项目在启动时候,如下图所示,链接数据库很慢 解决方法:在mysql 的配置文件中 配置 skip-name-resolve
- springboot项目启动成功后执行一段代码的两种方式
springboot项目启动成功后执行一段代码的两种方式 实现ApplicationRunner接口 package com.lnjecit.lifecycle; import org.springf ...
- springboot项目启动之后初始化自定义配置类
前言 今天在写项目的时候,需要再springboot项目启动之后,加载我自定义的配置类的一些方法,百度了之后特此记录下. 正文 方法有两种: 1. 创建自定义类实现 CommandLineRunner ...
- 【log4j】springboot项目启动 ,使用的druid数据源,log4j报错 log4j:WARN Please initialize the log4j system properly.
springboot项目启动 ,使用的druid数据源,log4j报错 -- :: --- [ restartedMain] o.hibernate.annotations.common.Versio ...
- Springboot项目启动不了。也不打印任何日志信息。
Springboot项目启动不了.也不打印任何日志信息. <!-- 在创建Spring Boot工程时,我们引入了spring-boot-starter,其中包含了spring-boot-sta ...
- springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde
springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde 创建 ...
- springboot项目启动无法访问到controller原因之一:引导类位置有问题
新建的springboot项目启动后,无法访问到controller 页面是404错误 查看项目结构,发现是新建工程的启动类位置有问题,controller类应该位于引导类的同级包或者子级包中.需要将 ...
- springboot 项目启动脚本
springboot项目启动可通过下面的shell脚本启动. startup.sh app=order-service-rest.jar appout=logs/${app/.jar/.out} ap ...
随机推荐
- asp.net core 全局授权管理系统简介
大家好,我最近在做一个管理系统,我希望能做出一种授权机制,通过数据库的配置,来动态管控每个登入用于的访问权限. 因为才接触core不久,了解core的授权机制还是用了些时间的. 所以总结出来,供大家分 ...
- Tomcat启动报A fatal error has been detected by the Java Runtime Environment
# # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x0000 ...
- python打包生成exe报错
如图所示 如果出现的是这个问题可以可以考虑以下方法 首先卸载原先下载的 Pyinstaller pip uninstall pyinstaller 再执行以下代码,去github上下载 pip ...
- (0403)位运算符+interface
1)interface 2)位运算符
- 51电子-STC89C51开发板:目录
51电子(我要电子:www.51dz.com),是国内最早一批的电子类相关网站,在深圳有实体店. 这个系列文章以 STC89C51 来做笔记,讲解使用过程. --------------------- ...
- Mac 启动转换助理 安装 win10
Mac 启动转换助理 安装 win10 Mac的处理器 是Inter芯 才有该功能 打开启动转换助理/Bootcamp 设置分区大小 win10安装完成后 在左侧的此电脑中找到咱们的Boot Camp ...
- Google colab防断联
(1)进入Colab的notebook界面,按快捷键F12,打开开发者模式或者右键检查进入,选择console (2)复制并运行代码 function ClickConnect(){ console. ...
- uniapp开发的app打开微信小程序
第一种 <script> export default { data() { return { sweixin: null } }, onLoad() { this.getPlus() } ...
- Codeforces 1208F Bits And Pieces
题目描述 You are given an array a of n integers. You need to find the maximum value of ai|(aj&ak) ov ...
- mysql and or优先级
and优先级高于or, 不使用()情形:or后仍遇到and时,先算and再算or select * from table1 where f1=1 and f2=2 or f3=3 and f4=4 o ...