2019年7月14日
摘要: 在项目中到一些问题,一些查询模块需要链接另一个数据库,这时,就可以配置两个数据源进行操作。 1.创建jdbc.properties jdbc.url = jdbc:mysql://localhost:3306/test1?useUnicode=true&characterEncoding=utf8j 阅读全文
posted @ 2019-07-14 07:29 激流勇进1 阅读(842) 评论(0) 推荐(0) 编辑
摘要: SpringMVC架构实现原理 一、SpringMVC介绍 Spring mvc是一个基于mvc的web框架。其中核心类是DispatcherServlet,它是一个Servlet,顶层是实现的Servlet接口。 Spring mvc是spring框架的一个模块,springmvc和spring无 阅读全文
posted @ 2019-07-14 07:27 激流勇进1 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 首先是mybatis中的批量新增sql语句。注意:这里我给的是我需要新增的字段,你们改成你们需要的字段。 <insert id="insertBatch" > insert into hm_authorization (ID,ROLE_CODE,RES_TYPE_CODE,RES_CODE) val 阅读全文
posted @ 2019-07-14 07:26 激流勇进1 阅读(984) 评论(0) 推荐(0) 编辑
摘要: 最近有一个需要从拦截器中获取post请求的参数的需求,这里记录一下处理过程中出现的问题。首先想到的就是request.getParameter(String )方法,但是这个方法只能在get请求中取到参数,post是不行的,后来想到了使用流的方式,调用request.getInputStream() 阅读全文
posted @ 2019-07-14 07:24 激流勇进1 阅读(3849) 评论(0) 推荐(1) 编辑
摘要: 如果使用springboot开发,可做如下配置: Config: import org.springframework.beans.factory.annotation.Qualifier;import org.springframework.boot.context.properties.Conf 阅读全文
posted @ 2019-07-14 07:23 激流勇进1 阅读(508) 评论(0) 推荐(0) 编辑