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.0</modelVersion><groupId>edu.shy.javaee</groupId><artifactId>sprint-boot-hello</artifactId><version>0.0.1-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.0.BUILD-SNAPSHOT</version></parent><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><!-- 指定一下jdk的版本,这里我们 使用jdk1.8,默认1.6 --><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.24</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.24</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(8088);
factory.setSessionTimeout(10,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

转载于:https://www.cnblogs.com/shy1766IT/p/9018587.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/267102.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

防止黑客入侵的五大技巧

2019独角兽企业重金招聘Python工程师标准>>> 防止黑客入的方法有很多&#xff0c;但是世界上没有绝对安全的系统。我们只可以尽量避免被入侵&#xff0c;最大的程度上减少伤亡。那么&#xff0c;接下来天下数据将为您详细介绍防止黑客入侵的五大技巧。(本文为天下数…

mysql js 命令行登录_mysqlsh 命令行模式与密码保存-爱可生

原标题&#xff1a;mysqlsh 命令行模式与密码保存-爱可生命令行模式mysql shell 如何实现类似 mysql -e "show processlist;" 的效果&#xff1f;即执行完就退出登录&#xff0c;不需要交互&#xff0c;我们经常在脚本中这样使用。那么同样的&#xff0c;在维护 Inno…

AngularJS学习笔记(1)——MVC模式的清单列表效果

MVC模式的清单列表效果 使用WebStorm新建todo.html并链入bootstrap.css、bootstrap-theme.css、angular.js。要链入的相关css和js文件预先准备好&#xff0c;文件目录如下&#xff1a; 使用MVC模式前的代码&#xff1a; <!DOCTYPE html> <html ng-app> <head&g…

C#多线程学习(六) 互斥对象

C#多线程学习(六) 互斥对象 原文链接&#xff1a;http://kb.cnblogs.com/page/42533/ 本系列文章导航 C#多线程学习(一) 多线程的相关概念 C#多线程学习(二) 如何操纵一个线程 C#多线程学习(三) 生产者和消费者 C#多线程学习(四) 多线程的自动管理(线程池) C#多线程学习(五) 多…

什么是mysql事物定义_Mysql事务原理

1. 什么是数据库事务1.1 事务的应用场景电商平台中例如常见的下单流程&#xff0c;会同时操作订单表&#xff0c;库存表等&#xff0c;有时候这些操作要在一个事务里面完成。还有金融系统业务的银行转账&#xff0c;需要保证一个账户增加另一个账户减少&#xff0c;这两个动作 …

centos 6 安装mosh 1.2

关于mosh&#xff08;引用于&#xff09; 芬兰研究员Tatu Ylnen于1995年设计出最早的SSH协议&#xff0c;它迅速成为最流行的远程登录安全协议。17年后&#xff0c;一组MIT的***提出了mosh&#xff0c;让SSH走向现代化。mosh是基于新的State Synchronization Protocol&#xff…

数组去重js方式

var selectmap new Array(); /(\x0f[^\x0f])\x0f[\s\S]*\1/.test("\x0f"selectmap.join("\x0f\x0f") "\x0f")返回为true表示存在重复数据转载于:https://www.cnblogs.com/lc93/p/9028038.html

mysql网络订餐系统截屏_在线订餐系统mysql字段

在线订餐系统mysql字段,随便写的了。也许要改变呢。再说吧啊。在线订餐系统mysql字段分成3个表开发1.user2.order3.pay1.用户表包含下面字段 id int 主键&#xff0c;自动累加&#xff0c;不为空&#xff0c;长度10就够了吧&#xff1b;用户名(name) varchar类型 30长度够了吧。…

学习jvm,关于MAT an internal error occurred during:Parsing heap dump from问题

写了一个死循环不断的创建对象&#xff0c;模拟内存溢出 1 package com.zuo.test1;2 3 import java.util.ArrayList;4 import java.util.List;5 6 public class Main {7 8 public static void main(String[] args) {9 List<Demo> demosnew ArrayList<…

实例讲解override和new的区别

一、override&#xff1a;Override关键字主要是提供派生类对基类方法的新实现。 1、不可以用于重写非虚方法和静态方法 2、与其配套使用的关键字是Virtual、abstract、Override。 3、不能使用修饰符 new、static、virtual 或 abstract 来修改 override 方法。 二、new&#xff…

mysql报错5_mysql5.5 启动报错:ERROR!_MySQL

bitsCN.com在FreeBSD中启动mysql时报错&#xff0c;ERROR! The server quit without updating PID file&#xff0c;通常这是可以查看数据库目录下的.err日志&#xff0c;里面会记录一些具体的错误信息&#xff0c;对排错相当有用&#xff0c;内容如下&#xff1a;110805 17:30…

MySQL安装总结

安装MySQL&#xff1a;&#xff08;以安装5.1版本为例&#xff09; 1. 双击你下载的安装程序&#xff0c;然后会进入一个‘Welecom to the Setup Wizard for MySQL Server 5.1’的图形界面&#xff01;在这里不用做任何操作&#xff0c;点击next&#xff0c;进入下一步&a…

java swing事件_第四节 Java Swing事件处理

第四节&#xff1a;事件处理一个图形界面完的成只是程序开发中起步的工作&#xff0c;因为要想让每一个组件都发挥其作用&#xff0c;就必须对所有的组件进行事件处理。那么什么是事件处理&#xff0c;所谓事件就表示一个对象发生状态变化。例如&#xff0c;每当按下一个按钮时…

jedate-开始使用一款好用的时间插件

jeDate日期控件 -&#xff08;原生JS版&#xff09;jeDate V6.5.0 是一款原生JS开发的 不依赖任何第三方库 大众化的日期控件&#xff0c;包含 多语言、设定年月&#xff08;YYYY-MM&#xff09;、日期范围限制、开始日期设定、自定义日期格式、根据不同的日期格式&#xff0c;…

我们买得起nook,kindle fire可我们买不起书啊

BARNES & NOBLE | Bring Up the Bodies by Hilary Mantel, Holt, Henry & Company, Inc. | NOOK Book (eBook), Hardcover, AudiobookBarnsnobles

java 验证码 插件_javaweb中验证码插件Kaptcha的使用

1.首先在pom.xml中导入依赖com.github.pengglekaptcha2.3.22.在web.xml中设置Kaptchacom.google.code.kaptcha.servlet.KaptchaServletkaptcha.bordernokaptcha.textproducer.font.colorredkaptcha.image.width135kaptcha.textproducer.char.stringACDEFHKPRSTWX345679kaptcha.…

zabbix的安装(一)监控os资源:内存,cpu,io,负载,带宽

一、Linux下开源监控系统简单介绍1&#xff09;cacti&#xff1a;存储数据能力强&#xff0c;报警性能差2&#xff09;nagios&#xff1a;报警性能差&#xff0c;存储数据仅有简单的一段可以判断是否在合理范围内的数据长度&#xff0c;储存在内存中。比如&#xff0c;连续采样…

linux下rpm方式安装mysql(2012-5-12)

由于感觉前几篇博客中关于linux下rpm方式安装mysql的方法问题太多&#xff0c;今天抽时间重新实践和整理了一下&#xff0c;现在拿出来和大家分享&#xff0c;希望对家有用。 系统环境&#xff1a;Rat had enterprise linux server 6.1MySQL-5.5.22-1.linux2.6.i386VMware Work…

list java语法_java基础语法 List

List的用法List包括List接口以及List接口的所有实现类。因为List接口实现了Collection接口&#xff0c;所以List接口拥有Collection接口提供的所有常用方法&#xff0c;又因为List是列表类型&#xff0c;所以List接口还提供了一些适合于自身的常用方法&#xff0c;如表1所示。表…

基础练习

口述题1.分别解释"","",""的含义。 是赋值语句 把一个值赋值给另一个值 是判断语句 判断两个值是否相等 是赋值语句 a1 等价于 aa1 2.两个变量的关系&#xff1f;n1123456n2n1 把123456赋值给变量n1,把n2赋值给n1,n1,n2共同指向123456这个地址 …