上一页 1 ··· 116 117 118 119 120 121 122 123 124 ··· 226 下一页
摘要: http://blog.csdn.net/angjunqiang/article/details/54340398 背景 服务端以及客户端在开发过程中不可避免的会使用到网络请求,网络请求可以使用Java原生的URLConnection,也可以使用HttpClient。在日常工作中建议大家使用Http 阅读全文
posted @ 2017-07-10 15:28 牧之丨 阅读(1487) 评论(0) 推荐(0) 编辑
摘要: 最近在折腾Maven和Sonatype的Nexus, 倒霉催的国内和公司网络... Nexus配合finalspeed或者kcptun倒是很给力, 但是Intellij就经常出问题, 出现红字也不动, 默认开了auto import也无效 解决方式是在IDEA右侧Maven Projects面板中, 阅读全文
posted @ 2017-07-10 14:39 牧之丨 阅读(3317) 评论(0) 推荐(0) 编辑
摘要: 名称说明 spring-boot-starter 核心 POM,包含自动配置支持、日志库和对 YAML 配置文件的支持。 spring-boot-starter-amqp 通过 spring-rabbit 支持 AMQP。 spring-boot-starter-aop 包含 spring-aop 阅读全文
posted @ 2017-07-07 08:17 牧之丨 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 环境 本文基于Spring Boot版本1.3.3, 使用了spring-boot-starter-web。 配置完成后,编写了代码如下: @SpringBootApplication public class Application { public static void main(String 阅读全文
posted @ 2017-07-06 21:41 牧之丨 阅读(3515) 评论(0) 推荐(0) 编辑
摘要: spring boot quick start 在spring boot里,很吸引人的一个特性是可以直接把应用打包成为一个jar/war,然后这个jar/war是可以直接启动的,不需要另外配置一个Web Server。 如果之前没有使用过spring boot可以通过下面的demo来感受下。 下面以 阅读全文
posted @ 2017-07-06 21:40 牧之丨 阅读(1997) 评论(0) 推荐(0) 编辑
摘要: 一.配置文件的生效顺序,会对值进行覆盖: 1. @TestPropertySource 注解 2. 命令行参数 3. Java系统属性(System.getProperties()) 4. 操作系统环境变量 5. 只有在random.*里包含的属性会产生一个RandomValuePropertySo 阅读全文
posted @ 2017-07-06 21:39 牧之丨 阅读(645) 评论(0) 推荐(0) 编辑
摘要: spring Boot 允许通过外部配置让你在不同的环境使用同一应用程序的代码,简单说就是可以通过配置文件来注入属性或者修改默认的配置。 Spring Boot 系列 Spring Boot 入门 Spring Boot 属性配置和使用 Spring Boot 集成MyBatis Spring Bo 阅读全文
posted @ 2017-07-06 21:37 牧之丨 阅读(1802) 评论(0) 推荐(0) 编辑
摘要: Maven 搭建spring boot多模块项目 备注:所有项目都在idea中创建 1.idea创建maven项目 1-1: 删除src,target目录,只保留pom.xml 1-2: 根目录pom.xml可被子模块继承,因此项目只是demo,未考虑太多性能问题,所以将诸多依赖 都写在根级`pom 阅读全文
posted @ 2017-07-06 21:35 牧之丨 阅读(1748) 评论(0) 推荐(0) 编辑
摘要: 代码从开发到测试要经过各种环境,开发环境,测试环境,demo环境,线上环境,各种环境的配置都不一样,同时要方便各种角色如运维,接口测试, 功能测试,全链路测试的配置,hardcode 肯定不合适,如Spring profile一样写在jar包不合适.分布式应用中一般采用集中管理配置的方式,通过使用开 阅读全文
posted @ 2017-07-06 21:34 牧之丨 阅读(3571) 评论(0) 推荐(0) 编辑
摘要: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with 阅读全文
posted @ 2017-07-05 14:21 牧之丨 阅读(2294) 评论(0) 推荐(0) 编辑
上一页 1 ··· 116 117 118 119 120 121 122 123 124 ··· 226 下一页