摘要: package com.kfit.base.scheduling; import org.springframework.context.annotation.Configuration;import org.springframework.scheduling.annotation.EnableS 阅读全文
posted @ 2017-10-20 18:03 ㊣ 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1.默认资源映射 Spring Boot 默认为我们提供了静态资源处理,使用 WebMvcAutoConfiguration 中的配置各种属性。 建议大家使用Spring Boot的默认配置方式,如果需要特殊处理的再通过配置进行修改。 如果想要自己完全控制WebMVC,就需要在@Configurat 阅读全文
posted @ 2017-10-20 17:38 ㊣ 阅读(834) 评论(0) 推荐(0) 编辑
摘要: 1.配置Contextpath 修改application.properties文件:添加server.context-path=/spring-boot 之后需要访问http://127.0.0.1:9090/spring-boot/demo/getDemo 2.修改默认的idk版本 <plugi 阅读全文
posted @ 2017-10-20 17:08 ㊣ 阅读(1600) 评论(0) 推荐(0) 编辑
摘要: 例如我们web服务器8080端口被占用:Address already in use: bind 有两种解决方案:1、把占用8080端口的程序终止掉。2、修改tomcat配置文件里的默认端口号 1、关闭占用8080端口的程序 在windows下,用命令行:netstat -ano来显示协议统计信息和 阅读全文
posted @ 2017-10-20 16:53 ㊣ 阅读(45009) 评论(0) 推荐(1) 编辑
摘要: 1.修改端口号:在application.properties文件添加:server.port=9090 就能将端口号修改为9090 2.连接数据库: 2.1:修改pom.xml 添加 2.2:application.properties文件添加: ######################### 阅读全文
posted @ 2017-10-20 16:35 ㊣ 阅读(336) 评论(0) 推荐(0) 编辑