摘要: 效果: 这种形式的嵌套适用于一对多的情况,里面是key-value的形式,也便于删除和修改。再如: 一对一的时候,也可以这样设计: 但嵌套本身存在需要注意的问题,比如嵌套内容数据量的大小,对内嵌文档的删除、修改是否便利等等。 下面这种设计就不便于操作: 这是可以修改为user和task2个文档,ta 阅读全文
posted @ 2016-11-08 16:44 yweihainan 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 在spring 中使用注解,常使用@Autowired, 默认是根据类型Type来自动注入的。 但有些特殊情况,对同一个接口,可能会有几种不同的实现类,而默认只会采取其中一种的情况下 @Primary 的作用就出来了。下面是个简单的使用例子。 有如下一个接口 public interface Sin 阅读全文
posted @ 2016-11-08 14:43 yweihainan 阅读(1285) 评论(0) 推荐(0) 编辑
摘要: pom: ehcache.xml 使用: 阅读全文
posted @ 2016-11-08 14:25 yweihainan 阅读(4156) 评论(0) 推荐(0) 编辑
摘要: 1 package nd.sdp.idea.modules.schedule; 2 3 import nd.sdp.idea.modules.idea.entity.Idea; 4 import nd.sdp.idea.modules.idea.enums.OriginalityType; 5 import nd.sdp.idea.modules.idea.service.... 阅读全文
posted @ 2016-11-08 14:15 yweihainan 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 1 package nd.sdp.idea.modules.schedule; 2 3 import nd.sdp.idea.modules.idea.entity.Idea; 4 import nd.sdp.idea.modules.idea.service.IdeaService; 5 import nd.sdp.idea.modules.reminder.entity.Cycl... 阅读全文
posted @ 2016-11-08 14:11 yweihainan 阅读(1146) 评论(0) 推荐(0) 编辑
摘要: 注解: 拦截器处理注解: 上下文: 阅读全文
posted @ 2016-11-08 13:59 yweihainan 阅读(844) 评论(0) 推荐(0) 编辑