![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring-boot
文章平均质量分 59
tomoto_zh
这个作者很懒,什么都没留下…
展开
-
Spring boot之读取自定义配置文件
1,定义配置文件mypro.properties #自定义配置 base.redis.url=localhost:43434 2,在启动类上加上配置注解: @PropertySource("classpath:mypro.properties") public class Application {} 这是定义要读取的properties文件的位置,另外,假如只读取该文件中的原创 2017-07-19 14:24:00 · 2461 阅读 · 0 评论 -
Spring boot之使用Junit测试
1,pom.xml引入junit依赖 dependency> groupId>org.springframework.bootgroupId> artifactId>spring-boot-starter-testartifactId> scope>testscope> dependency> 2,编写测试类 @RunWith(SpringJUnit4Cl原创 2017-07-19 14:18:38 · 6340 阅读 · 1 评论 -
Spring Boot学习(1)—— mac上Intellij使用Gradle构建Spring Boot项目,并使用Groovy
首先,需要自己下载Intellij、Gradle、Groovy。 1,Intellij创建项目,选择Spring Initializr,然后next 2,设置group、artifact,Type选择Gradle Project,Language我选择的是Groovy,使用Java就选择Java,然后next 3,选择需要的组件,我新建的是一个web项目,所以勾选了...原创 2017-09-22 10:59:33 · 1742 阅读 · 0 评论 -
Spring Boot使用RabbitMQ出现诡异异常:Failed to send reply with payload 'OK',Cannot determine ReplyTo message
今天项目中出现一个诡异的异常:org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Listener threw exception at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContain...原创 2018-03-15 17:29:54 · 12287 阅读 · 5 评论