- 博客(6)
- 收藏
- 关注
原创 Oracle 批量创建授权语句
在一些安全要求比较高的系统建设过程中,建表和访问表的用户是区分开来的, 且需要授权。建表用户可能同时拥有多个项目的表,只针对某个项目的表授权,有时候表太多了,一个一个写比较费时间。那就需要用sql脚本来批量生成授权语句。直接上代码模板:select '[需要授权的权限,select,update,insert,delete] on '||t.owner||'.'||t.table_name||' ...
2018-05-30 16:50:16 1830
转载 Spring的 classpath 通配符加载Mybatis配置文件(支持指定多个文件写法)
classpath:app-Beans.xml说明:无通配符,必须完全匹配 classpath:App?-Beans.xml说明:匹配一个字符,例如 App1-Beans.xml 、 App2-Beans.xml classpath:user/*/Base-Beans.xml说明:匹配零个或多个字符串(只针对名称,不匹配目录分隔符等),例如:user/a/Base-Beans.xml 、 user...
2018-05-21 13:37:12 3973
原创 SpringBoot+mybatis Field xxMapper in xxx required a bean of type 'XXMapper' that could not be found
用Spring Boot + Mybatis 做项目。项目代码结构是RestController + Service + ServiceImpl + Mapper + xxMapper.xml。在启动的时候报错:Field xxxMapper in XXX required a bean of type 'XXXMapper' that could not be found.Consider de...
2018-05-21 10:40:52 4229 1
原创 Spring Boot启动 MyBatis报错 Could not find result map java.lang.Integer
工作的项目,Spring Boot整合Mybatis后启动报错Could not find result map java.lang.Integer。直接拉到最后看到错误信息:Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.lang.Integ...
2018-05-16 09:44:16 1789
原创 MyBatis使用Mapper查询时报错:java.lang.StringIndexOutOfBoundsException: String index out of range: 8000
SpringBoot项目做订单查询接口开发,使用Mybatis的Mapper做查询的时候,抛出异常java.lang.StringIndexOutOfBoundsException: String index out of range: 8000错误信息指向了响应查询请求的Controller之后没有更具体的错误信息,一路跟踪,最后指向我定义的mapper的查询方法,但是我这个方法内没看到...
2018-05-08 20:14:10 29297
翻译 Java一行代码实现Map转List
做项目的时候,遇到这么一个应用场景。需要一个Map来查重,并做业务操作。最后需要把这个map中存放的对象转存到一个List当中。最直接的写法就是遍历这个Map一个一个add到这个list当中。在stackoverflow找到了另一种写法:假设有一个mapMap<String, Order> ordMap = new HashMap<String, Ord...
2018-05-08 19:59:50 643
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人