摘要:
ElasticsearchStatusException 依赖版本不对 阅读全文
摘要:
MongoTemplate:(主要是集合和文档的增删改查) 方法: getCollectionNames getCollection collectionExists collectionExists dropCollection dropCollection indexOps indexOps s 阅读全文
摘要:
准备集成环境,添加依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.3.RELEASE</version> 阅读全文
摘要:
阅读全文
摘要:
8. 实例代码 package cn.wolfcode.demo.web.controller; import cn.wolfcode.demo.domain.Role; import org.springframework.stereotype.Controller; import org.spr 阅读全文
摘要:
@Import 源码 @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Import { /** * {@link Configuration @Configurat 阅读全文
摘要:
@PropertySource 属性 1.value为要加载的文件,可以是多个,当以classpath开头时,程序会自动到classpath中读取,当以file开头时,会加载外部的文件2.name是表示要加载文件的名称,这里要加载的配置文件必须是 唯一的不能是多个3.encoding,设置编码,我们 阅读全文
摘要:
一级:项目根目录中的config/application.properties 二级:项目根目录下的application.properties 三级:项目src/main/resources/config/下的appliacation.properties 四级:.项目src/main/resou 阅读全文
摘要:
Interceptor类 package cn.wolfcode.interceptor; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelA 阅读全文
摘要:
不使用SpringBoot Filter过滤类 1 public class FilterDemo implements Filter { 2 3 @Override 4 public void doFilter(ServletRequest servletRequest, ServletRespo 阅读全文