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

原文链接: http://www.cnblogs.com/hehehaha/p/6147135.html

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 to tmp)

#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 URL decoding

 

 

Spring Boot 系列博客】

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

 

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

 

56. spring boot中使用@Async实现异步调用【从零开始学Spring Boot 

 

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

 

54. spring boot日志升级篇—logback【从零开始学Spring Boot

 

52. spring boot日志升级篇—log4j多环境不同日志级别的控制【从零开始学Spring Boot 

 

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

 

50. Spring Boot日志升级篇—log4j【从零开始学Spring Boot

 

49. spring boot日志升级篇理论【从零开始学Spring Boot

 

48. spring boot单元测试restfull API【从零开始学Spring Boot

 

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

 

46. Spring Boot中使用AOP统一处理Web请求日志

 

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

 

44. Spring Boot日志记录SLF4J【从零开始学Spring Boot

 

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

 

42. Spring Boot多数据源【从零开始学Spring Boot

 

41. Spring Boot 使用Java代码创建Bean并注册到Spring中【从零开始学Spring Boot

 

40. springboot + devtools(热部署)【从零开始学Spring Boot 

 

39.4 Spring Boot Shiro权限管理【从零开始学Spring Boot

 

39.3 Spring Boot Shiro权限管理【从零开始学Spring Boot

 

39.2. Spring Boot Shiro权限管理【从零开始学Spring Boot

 

39.1 Spring Boot Shiro权限管理【从零开始学Spring Boot

 

38 Spring Boot分布式Session状态保存Redis【从零开始学Spring Boot 

 

37 Spring Boot集成EHCache实现缓存机制【从零开始学Spring Boot 

 

36 Spring Boot Cache理论篇【从零开始学Spring Boot

 

35 Spring Boot集成Redis实现缓存机制【从零开始学Spring Boot 

 

34Spring Boot的启动器Starter详解【从零开始学Spring Boot

 

33 Spring Boot 监控和管理生产环境【从零开始学Spring Boot

 

32 Spring Boot使用@SpringBootApplication注解从零开始学Spring Boot 

 

31 Spring Boot导入XML配置【从零开始学Spring Boot

 

 

更多查看博客: http://412887952-qq-com.iteye.com/

转载于:https://www.cnblogs.com/hehehaha/p/6147135.html

你可能感兴趣的:((10)Spring Boot修改端口号【从零开始学Spring Boot】)