
框架
文章平均质量分 86
dreamer_8399
这个作者很懒,什么都没留下…
展开
-
maven项目分模块
一、新建parent项目右键-new-other 搜索Maven删除src二、右键test-parent项目,创建模块modules跟二类似分别创建test-domain(dao+service)、test-utils(所有util工具类)三、web模块创建以及子模块引入1、创建maven项目2、引入子模块test-web原创 2017-08-30 16:10:26 · 340 阅读 · 0 评论 -
SSM整合shiro进行权限控制以及shiro的一些特殊功能实现
项目结构图:一、先新建一个maven项目,配置pom.xml<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 h原创 2017-08-24 09:40:20 · 14361 阅读 · 7 评论 -
ssm+rabbitMQ整合
1、pom.xml导入相应jar(注:exclusions标签中的是与spring别的jar相冲突的处理,如果不冲突可以不加) org.springframework.amqp spring-rabbit 2.0.1.RELEASE spring-context org.spri原创 2017-12-12 16:10:06 · 5905 阅读 · 0 评论 -
SpringCloud分布式框架
1、微服务构建:springboot pom.xml 基本引入(也可通过springInitlizr 时选择导入)<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-st...原创 2018-07-17 18:17:56 · 411 阅读 · 0 评论 -
java反射用法
1、获取Class三种方式:(1)通过class字符串:Class entityClass = Class.forName("com.loan.back.entity.Article");(2)通过对象获取:Class entityClass1=entityObject.getClass();(3)通过实体类获取 Class entityClass1=实体类.c原创 2017-08-29 10:17:11 · 310 阅读 · 0 评论 -
SSM整合
转自:http://www.cnblogs.com/HigginCui/p/5859788.html【SSM的系统架构】【整合概述】第一步: MyBatis和Spring整合,通过Spring管理mapper接口。 使用mapper的扫描器自动扫描mapper接口在Spring中进行注册。第二步: 通过Spring管理Ser转载 2017-08-15 14:43:20 · 444 阅读 · 1 评论 -
eclipse中利用Maven逆向工程生成PO类以及mapper(mybatis)
1、在pom.xml的project>build里面添加如下代码,让maven环境支持mybatis-generator组件 org.mybatis.generator mybatis-generator-maven-plugin 1.3.2 src/main/resources/generator.xml t原创 2017-08-15 11:58:16 · 7928 阅读 · 0 评论 -
Junit 使用方法
1、pom.xml中引入需要的jar注:建议spring-Test.jar在pom.xml 文末引入,我在最前面引入报错,说是缺少jar,这点事需要注意的 junit junit 4.12 org.springframework spring-test 3.2.4.RELEA原创 2017-08-18 15:23:47 · 388 阅读 · 0 评论 -
spring事务管理配置以及事务相关知识点
转载自:http://blog.youkuaiyun.com/bao19901210/article/details/41724355#comments事务管理对于企业应用来说是至关重要的,好使出现异常情况,它也可以保证数据的一致性。spring支持编程式事务管理和声明式事务管理两种方式。 编程式事务管理使用TransactionTemplate或者直接使转载 2017-07-26 15:24:11 · 229 阅读 · 0 评论 -
spring集成定时任务框架 Quartz的两种方式
spirng集成Quartz是经常需要用到的,这里总结一下,集成的配置以及使用方法。1、application-context.xml中定时任务配置(1)定义业务处理类(2)增加业务调度逻辑class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">原创 2017-07-27 13:59:31 · 422 阅读 · 0 评论 -
ssm+redis缓存配置
1、application-context.xml配置 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/原创 2017-08-14 14:10:46 · 8334 阅读 · 1 评论 -
ssm中maven中profiles多环境配置
pom.xml loanNew src/main/resources **/* --> true src/main/webapp/static/ueditor/jsp **/* --> true dev true 192.原创 2017-08-14 14:36:35 · 1788 阅读 · 0 评论 -
SpringMVC中使用Interceptor拦截器,过滤器使用
转载自:http://elim.iteye.com/blog/1750680SpringMVC 中的Interceptor 拦截器也是相当重要和相当有用的,它的主要作用是拦截用户的请求并进行相应的处理。比如通过它来进行权限验证,或者是来判断用户是否登陆,或者是像12306 那样子判断当前时间是否是购票时间。 一、定义Interceptor实现类 SpringMVC 中的In转载 2017-08-03 11:30:00 · 757 阅读 · 0 评论 -
SpringMVC自定义注解并自定义解析器HandlerMethodArgumentResolver
1、创建保持常量的类Constants:package com.loan.fore;public class Constants { public static final String CURRENT_USER = "user"; public static final String IsShow = "IsShow";}2、自定义注解CurrentUser.java:原创 2017-08-14 17:03:58 · 1098 阅读 · 0 评论 -
SSM 配置两个数据源来回切换
经常遇到需要在两个数据源之间来回切换,基于SSM配置步骤如下:1、application-context.xml中:(1)一个数据源时的配置:<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:c原创 2017-07-26 10:02:00 · 670 阅读 · 0 评论 -
springMVC 获取.properties中属性值
之前一直用的是Java代码获取配置文件中的属性值,也是可以实现的,代码如下:public Integer getProperty(String propertyName) throws IOException{ Properties props = new Properties(); InputStream inputStream = this.getCl原创 2017-07-17 14:34:25 · 4036 阅读 · 2 评论