转载:http://blog.csdn.net/linxingliang/article/details/51637017

spring boot 默认端口是8080,如果想要进行更改的话,只需要修改applicatoin.properties文件,在配置文件中加入:

server.port=9090

常用配置:

########################################################

###EMBEDDED SERVER CONFIGURATION (ServerProperties)

########################################################

#server.port=8080

#server.address= # bind to a specific NIC

#server.session-timeout= # session timeout in seconds

#the context path, defaults to '/'

#server.context-path=/spring-boot

#server.servlet-path= # the servlet path, defaults to '/'

#server.tomcat.access-log-pattern= # log pattern of the access log

#server.tomcat.access-log-enabled=false # is access logging enabled

#server.tomcat.protocol-header=x-forwarded-proto # ssl forward headers

#server.tomcat.remote-ip-header=x-forwarded-for

#server.tomcat.basedir=/tmp # base dir (usually not needed, defaults totmp)

#server.tomcat.background-processor-delay=30; # in seconds

#server.tomcat.max-threads = 0 # number of threads in protocol handler

#server.tomcat.uri-encoding = UTF-8 # character encoding to use for URLdecoding

10. 修改端口号【从零开始学Spring Boot】的更多相关文章

  1. (10)Spring Boot修改端口号【从零开始学Spring Boot】

    Spring boot 默认端口是8080,如果想要进行更改的话,只需要修改applicatoin.properties文件,在配置文件中加入: server.port=9090 常用配置: #### ...

  2. 57. Spring 自定义properties升级篇【从零开始学Spring Boot】

    之前在两篇文章中都有简单介绍或者提到过 自定义属性的用法: 25.Spring Boot使用自定义的properties[从零开始学Spring Boot] 51. spring boot属性文件之多 ...

  3. 51. spring boot属性文件之多环境配置【从零开始学Spring Boot】

    原本这个章节是要介绍<log4j多环境不同日志级别的控制的>但是没有这篇文章做基础的话,学习起来还是有点难度的,所以我们先一起了解下spring boot属性文件之多环境配置,当然文章中也 ...

  4. (37)Spring Boot集成EHCache实现缓存机制【从零开始学Spring Boot】

    [本文章是否对你有用以及是否有好的建议,请留言] 写后感:博主写这么一系列文章也不容易啊,请评论支持下. 如果看过我之前(35)的文章这一篇的文章就会很简单,没有什么挑战性了. 那么我们先说说这一篇文 ...

  5. 67. @Transactional的类注入失败【从零开始学Spring Boot】

    [从零开始学习Spirng Boot-常见异常汇总] Spring的代理模式有两种:java自带的动态代理模式和cglib代理模式,cglib代码模式适用于没有接口的类,而java自带适用于接口类,默 ...

  6. 58. Spring Boot国际化(i18n)【从零开始学Spring Boot】

    国际化(internationalization)是设计和制造容易适应不同区域要求的产品的一种方式.它要求从产品中抽离所有地域语言,国家/地区和文化相关的元素.换言之,应用程序的功能和代码设计考虑在不 ...

  7. 55. spring boot 服务配置和部署【从零开始学Spring Boot】

    Spring Boot 其默认是集成web容器的,启动方式由像普通Java程序一样,main函数入口启动.其内置Tomcat容器或Jetty容器,具体由配置来决定(默认Tomcat).当然你也可以将项 ...

  8. 47. Spring Boot发送邮件【从零开始学Spring Boot】

    (提供源代码) Spring提供了非常好用的JavaMailSender接口实现邮件发送.在Spring Boot的Starter模块中也为此提供了自动化配置.下面通过实例看看如何在Spring Bo ...

  9. (45). Spring Boot MyBatis连接Mysql数据库【从零开始学Spring Boot】

    大家在开发的时候,会喜欢jdbcTemplate操作数据库,有喜欢JPA操作数据库的,有喜欢MyBatis操作数据库的,对于这些我个人觉得哪个使用顺手就使用哪个就好了,并没有一定要使用哪个,个人在实际 ...

  10. (43). Spring Boot动态数据源(多数据源自动切换)【从零开始学Spring Boot】

    在上一篇我们介绍了多数据源,但是我们会发现在实际中我们很少直接获取数据源对象进行操作,我们常用的是jdbcTemplate或者是jpa进行操作数据库.那么这一节我们将要介绍怎么进行多数据源动态切换.添 ...

随机推荐

  1. Visual Studio中的/MD, /MT, /MDd, /MTd 选项

    Visual Studio中/MD, /MT, /MDd, /MTd表示多线程模块是否为dll.对于这几个选项我的理解如下: /MD: 定义了_MT和_DLL,让程序用多线程和dll版本的运行库. / ...

  2. bestcoder15_love

    #include <iostream> #include <stdio.h> #include <string.h> #include <vector> ...

  3. Http错误大全

    HTTP/IIS错误类型 1XX 信息提示 用于表示临时的响应.客户端在收到常规响应之前,应准备接受一个或多个1XX响应. 100 :继续101 :切换协议 2XX 成功 表示服务器成功地接受了客户端 ...

  4. 转:Android Context的理解

    转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/40481055,本文出自:[张鸿洋的博客] 本文大多数内容翻译自:http://w ...

  5. linux -特殊符号

    在shell中常用的特殊符号罗列如下: # ;   ;; . , / \\ 'string'| !   $   ${}   $? $$   $* \"string\"* **   ...

  6. 分享C# GC 非原创

    一. 托管资源的分配 CLR在运行时管理着一段内存地址空间(虚拟地址空间,在运行中会映射到物理内存地址中),分为“托管堆”和“栈”两部分,栈用于存储值类型数据,它会在方法执行结束后自动销毁其中引用的值 ...

  7. [9018_1592]USACO 2014 Open Silver Fairphoto

    题目描述 Farmer John's N cows (1 <= N <= 100,000) are standing at various positions along a long o ...

  8. bind 简单配置dns

    一. 安装apt-get install bind9 apt-get install bind9-host dnsutils apt-get install bind9-doc 二.修改本机配置我们要 ...

  9. BeeFramework 系列

    http://ilikeido.iteye.com/category/281079 BeeFramework 系列三 MVC篇上 博客分类: Beeframework iphone开发 mvc框架Be ...

  10. cpp调用dll

    c++ 显示调用 其他程序dll #pragma comment(lib, "DllTest.lib") int fnDllTest(void); int c = fnDllTes ...