Spring Boot之HelloWorld
视频网址:http://www.iqiyi.com/w_19ruksbpf1.html
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.</modelVersion> <groupId>edu.shy.javaee</groupId>
<artifactId>sprint-boot-hello</artifactId>
<version>0.0.-SNAPSHOT</version>
<packaging>jar</packaging> <name>sprint-boot-hello</name>
<url>http://maven.apache.org</url>
<!--sprint boot 父节点依赖,引入这个之后相关的引入就不需要加version配置,sprint boot 会自动选择最合适的版本进行添加 -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4..BUILD-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-</project.build.sourceEncoding>
<!-- 指定一下jdk的版本,这里我们 使用jdk1.,默认1. -->
<java.version>1.8</java.version>
</properties> <dependencies>
<!-- spring-boot-starter-web:MVC,AOP的依赖包 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.</version>
</dependency>
</dependencies> <!-- Package as an executable jar -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build> <!-- Add Spring repositories -->
<!-- (you don't need this if you are using a .RELEASE version) -->
<repositories>
<repository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories> </project>
参考:https://blog.csdn.net/lxhjh/article/details/51711148
问题:Failed to load class "org.slf4j.impl.StaticLoggerBinder"
添加配置:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.</version>
</dependency>
参考:https://blog.csdn.net/qq_35923749/article/details/76735191
问题:Failed to start end point associated with ProtocalHandler [http-nio-8080] java.net.BindException:Address already in use :bind
SPRING-BOOT中TOMCAT端口修改
https://stackoverflow.com/questions/21083170/spring-boot-how-to-configure-port
https://www.cnblogs.com/h-ys/p/5470047.html

或
干掉进程中Java(TM) Platform SE binary

参考:https://www.cnblogs.com/onlycxue/p/3573154.html
或:
@Bean
public EmbeddedServletContainerFactory servletContainer(){
TomcatEmbeddedServletContainerFactory factory=new TomcatEmbeddedServletContainerFactory();
factory.setPort();
factory.setSessionTimeout(,TimeUnit.MINUTES);
//factory.addErrorPages(new ErrorPage(HttpStatus.Not_FOUND,"/notfund.html"));
return factory;
}
参考:
https://www.cnblogs.com/zhao1949/p/6206417.html
spring boot
spring cloud
https://www.zhihu.com/question/39483566
Spring Boot之HelloWorld的更多相关文章
- Spring Boot 之 HelloWorld详解
摘要: 原创出处:www.bysocket.com 泥瓦匠BYSocket 希望转载,保留摘要,谢谢! “以前是人放狗看家,现在是狗牵着人散步” — 随笔 一.Spring Boot 自述 世界上最好 ...
- Springboot(二):Spring Boot 之 HelloWorld
关于项目的创建不再解释,需要了解的请参考: Springboot(一):使用Intellij中的Spring Initializr来快速构建Spring Boot工程 目录结构: 首先我们在上一项目的 ...
- 借助Maven入手Spring Boot第一个程序
目前网上有不少Spring Boot的入门文章,都很有帮助,本人最近在深入学习Spring Cloud,在搭建第一个Hello World程序时,感觉对于新手而言,介绍文章怎么详细都不为过,因为其中坑 ...
- Spring Boot 集成 FreeMarker 详解案例(十五)
一.Springboot 那些事 SpringBoot 很方便的集成 FreeMarker ,DAO 数据库操作层依旧用的是 Mybatis,本文将会一步一步到来如何集成 FreeMarker 以及配 ...
- Spring Boot应用启动的三种方式
Spring Boot应用HelloWorld的三种启动方式: 项目的创建可以在http://start.spring.io/网站中进行项目的创建. 首先项目结构: 1. 通过main方法的形式启动 ...
- spring boot 初试,springboot入门,springboot helloworld例子
因为项目中使用了spring boot ,之前没接触过,所以写个helloworld玩玩看,当做springboot的一个入门例子.搜索 spring boot.得到官方地址:http://proje ...
- Spring Boot——2分钟构建spring web mvc REST风格HelloWorld
之前有一篇<5分钟构建spring web mvc REST风格HelloWorld>介绍了普通方式开发spring web mvc web service.接下来看看使用spring b ...
- [转]Spring Boot——2分钟构建spring web mvc REST风格HelloWorld
Spring Boot——2分钟构建spring web mvc REST风格HelloWorld http://projects.spring.io/spring-boot/ http://spri ...
- Spring Boot实战之逐行释义HelloWorld
一.前言 研究Spring boot也有一小段时间了,最近会将研究东西整理一下给大家分享,大概会有10~20篇左右的博客,整个系列会以一个简单的博客系统作为基础,因为光讲理论很多东西不是特别容易理解 ...
随机推荐
- matlab中help所有函数功能的英文翻译
doc funname 在帮助浏览器中打开帮助文档 help funname 在命令窗口打开帮助文档 helpbrowser 直接打开帮助浏览器 lookfor funname 搜索某个关键字相关函数 ...
- 修改linux的文件时,如何快速找到要修改的内容并修改
修改linux系统下的文件时,如果文件内容很多,不容易找到需要修改的内容,下面详细介绍linux系统下如何快速修改文件. 工具/原料 linux系统 方法/步骤 在linux系统下,找到需 ...
- (笔试题)小米Git
题目: git是一种分布式代码管理工具,git通过树的形式记录文件的更改历史,比如: base'<--base<--A<--A' ^ | --- B<--B' 小米工程师常常需 ...
- ab测试工具参数详解
-n 测试会话中所执行的请求个数,默认仅执行一个请求 -c 一次产生的请求个数,即同一时间发出多少个请求,默认为一次一个 -t 测试所进行的最大秒数,默认为无时间限制....其内部隐含值是[-n 50 ...
- Your Customers Do Not Mean What They Say
Your Customers Do Not Mean What They Say Nate Jackson I'VE NEVER MET A CUSTOMER YET that wasn't all ...
- grep命令经常使用參数及使用方法
1.grep介绍 grep命令是Linux系统中一种强大的文本搜索工具,它能使用正則表達式搜索文本.并把匹 配的行打印出来.grep全称Global Regular Expression Print, ...
- shell和awk配合使用
#!/bin/sh#$1 video id#$2 save result file########################################################### ...
- BIOS和Bootloader的对比
桌面电脑刚加电时,一个叫做BIOS的软件程序立刻获得了处理器的控制权.(历史上,BIOS是Basic Input/Output Software的缩写,但现在这个单词已经有了自身的含义,因为其完成的功 ...
- YUM常用命令详解
yum是一个用于管理rpm包的后台程序,用python写成,可以非常方便的解决rpm的依赖关系.在建立好yum服务器后,yum客户端可以通过 http.ftp方式获得软件包,并使用方便的命令直接管理. ...
- vue 常见报错问题
情况一:http://eslint.org/docs/rules/no-tabs Unexpected tab character 解决方案:缩进是4个空格,而不是tab,设置indent 情况二 ...