摘要: jar包依赖: 关于mybatis的jar包 <!-- mybatis --> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> < 阅读全文
posted @ 2019-01-24 11:24 MengJH 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 开发步骤: 1 配置多数据源 2 不同源的实体类放入不同包路径 3 声明不同的包路径下使用不同的数据源、事务支持 异构数据源支持: 1.mysql和MongoDB 实体类声明@Entity 关系型数据库支持类型、声明@Document 为mongodb支持类型,不同的数据源使用不同的实体就可以了 < 阅读全文
posted @ 2019-01-24 10:14 MengJH 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1.jar包依赖 <!-- redis --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> 阅读全文
posted @ 2019-01-22 22:49 MengJH 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1.jar包依赖 <!-- 数据库操作 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> < 阅读全文
posted @ 2019-01-22 22:12 MengJH 阅读(3918) 评论(0) 推荐(0) 编辑
摘要: Spring Boot自动添加了OrderedCharacterEncodingFilter和HiddenHttpMethodFilter,直接自定义Filter。 步骤: 1.实现Filter接口,实现Filter方法 2.添加@Configuration 注解,将自定义Filter加入过滤链 自 阅读全文
posted @ 2019-01-22 21:43 MengJH 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1.@SpringBootApplication @SpringBootApplication = (默认属性)@Configuration + @EnableAutoConfiguration + @ComponentScan。 分开解释: (1)、@Configuration:提到@Config 阅读全文
posted @ 2019-01-22 21:17 MengJH 阅读(330) 评论(0) 推荐(0) 编辑