上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 26 下一页

2019年10月31日

@Value和@ConfigurationProperties

摘要: 1.@Value用法 https://blog.csdn.net/u010832551/article/details/73826914 2.@ConfigurationProperties用法 https://www.jianshu.com/p/7f75936b573b 3.最近看到的一个新的用法 阅读全文

posted @ 2019-10-31 19:30 木西-Muxy 阅读(331) 评论(0) 推荐(0)

mongodb为集合新增字段、删除字段、修改字段(转)

摘要: 新增字段 为atest集合新增一个字段content db.atest.update({},{$set:{content:""}},{multi:1}) 删除uname字段 db.atest.update({},{$unset:{uname:""}},false,true) 修改字段,把conten 阅读全文

posted @ 2019-10-31 09:20 木西-Muxy 阅读(26922) 评论(0) 推荐(0)

2019年10月30日

mongoTemplate CURD 和模糊查询(转)

摘要: 此文基于Spring的MongoTemplate,介绍MongoDB比较基础常用的增删改查操作。涵盖了从集合创建、索引创建和CRUD操作到更高级的功能(如Map-Reduce和聚合)等等。不多说,直接上代码。 模糊查询:https://blog.csdn.net/weixin_42227975/ar 阅读全文

posted @ 2019-10-30 15:39 木西-Muxy 阅读(6438) 评论(0) 推荐(0)

在项目中使用Swagger接口说明

摘要: 该链接写的内容非常详细: https://blog.csdn.net/xudant/article/details/82856555 阅读全文

posted @ 2019-10-30 15:27 木西-Muxy 阅读(374) 评论(0) 推荐(0)

mongodb 批量添加、修改和删除

摘要: 1.使用MongoTemplate a.批量插入 Insert a Collection of objects into a collection in a single batch write to the database. <T> Collection<T> insert(Collection 阅读全文

posted @ 2019-10-30 15:21 木西-Muxy 阅读(12830) 评论(0) 推荐(0)

@SpringQueryMap注解 feign的get传参方式(转)

摘要: spring cloud项目使用feign的时候都会发现一个问题,就是get方式无法解析对象参数。其实feign是支持对象传递的,但是得是Map形式,而且不能为空,与spring在机制上不兼容,因此无法使用。 spring cloud在2.1.x版本中提供了@SpringQueryMap注解,可以传 阅读全文

posted @ 2019-10-30 13:51 木西-Muxy 阅读(6553) 评论(0) 推荐(0)

Spring下的@Order和@Primary与javax.annotation-api下@Priority【Spring4.1后】等方法控制多实现的依赖注入(转)

摘要: @Order 可以作用在类、方法、属性。 影响加载顺序。 若不加,spring的加载顺序是随机的。 @Primary 当注入bean冲突时,以@Primary定义的为准。 @Order是控制配置类的加载顺序,还能控制List<XXX> 里面放的XXX的实现注入的顺序,下面介绍使用Spring下的@O 阅读全文

posted @ 2019-10-30 12:31 木西-Muxy 阅读(1651) 评论(0) 推荐(1)

@RequestBody和@RequestParam区别

摘要: 一:@RequestBody和@RequestParam区别 @RequestParam用来处理Content-Type: 为 application/x-www-form-urlencoded编码的内容。(Http协议中,如果不指定Content-Type,则默认传递的参数就是applicatio 阅读全文

posted @ 2019-10-30 12:23 木西-Muxy 阅读(31691) 评论(0) 推荐(3)

Juit4 SpringBoot注解

摘要: @RunWith就是一个运行器 @RunWith(JUnit4.class)就是指用JUnit4来运行 @RunWith(SpringJUnit4ClassRunner.class),让测试运行于Spring测试环境 @RunWith(Suite.class)的话就是一套测试集合, @Context 阅读全文

posted @ 2019-10-30 10:27 木西-Muxy 阅读(231) 评论(0) 推荐(0)

Spring Boot干货系列:(十二)Spring Boot使用单元测试(转)

摘要: 前言这次来介绍下Spring Boot中对单元测试的整合使用,本篇会通过以下4点来介绍,基本满足日常需求 Service层单元测试 Controller层单元测试 新断言assertThat使用 单元测试的回滚 正文Spring Boot中引入单元测试很简单,依赖如下: 本篇实例Spring Boo 阅读全文

posted @ 2019-10-30 10:06 木西-Muxy 阅读(400) 评论(0) 推荐(0)

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 26 下一页

导航