上一页 1 ··· 441 442 443 444 445 446 447 448 449 ··· 507 下一页
摘要: shiro是一个权限框架,具体的使用可以查看其官网 http://shiro.apache.org/  它提供了很方便的权限认证和登录的功能. 而springboot作为一个开源框架,必然提供了和shiro整合的功能!接下来就用springboot结合springmvc,myba 阅读全文
posted @ 2018-01-17 14:01 星朝 阅读(273) 评论(0) 推荐(0)
摘要: idea + mybatis generator + maven 插件使用 采用的是 generator 的 maven 插件的方式 ~ 1 pom.xml mybatis其它配置一样,下面是配置mybatis generator 的 maven插件 <plugins> <plug 阅读全文
posted @ 2018-01-17 13:45 星朝 阅读(547) 评论(0) 推荐(0)
摘要: ```xml ``` 阅读全文
posted @ 2018-01-17 13:24 星朝 阅读(1196) 评论(0) 推荐(0)
摘要:         最近使用mybatisgenerator时,希望生成annotation的mapper,在网上基本桑没有相关配置,记录,做以下记录: [html] view plain copy print?<?xml version="1.0 阅读全文
posted @ 2018-01-17 12:01 星朝 阅读(1469) 评论(0) 推荐(0)
摘要: Spring中为了减少xml中配置,可以声明一个配置类(例如SpringConfig)来对bean进行配置。 一、首先,需要xml中进行少量的配置来启动Java配置: [java] view plain copy print?<?xml version="1.0" enco 阅读全文
posted @ 2018-01-17 10:45 星朝 阅读(2205) 评论(0) 推荐(0)
摘要: 该问题的实质是,idea对classpath的规定。 在eclipse中,把资源文件放在src文件夹下,是可以找到的; 但是在idea中,直接把资源文件放在src文件夹下,如果不进行设置,是不能被找到的。 下面说说几种解决方法,网上说的都很混乱,我这里做一个总结:推荐方法4 1.将所有资源文件放在r 阅读全文
posted @ 2018-01-17 10:33 星朝 阅读(6293) 评论(1) 推荐(2)
摘要: 需求 代码实现读写数据库分离 武器 spring3.0以上版本 实现思路 1、继承org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource,自定义数据源路由。 2、实现数据源类型管理工具,诸如DBContextHolde 阅读全文
posted @ 2018-01-16 21:00 星朝 阅读(301) 评论(0) 推荐(0)
摘要: 最近比较忙,没来得及抽时间把MyBatis的集成发出来,其实mybatis官网在2015年11月底就已经发布了对SpringBoot集成的Release版本,Github上有代码:https://github.com/mybatis/mybatis spring boot 前面对JPA和JDBC连接 阅读全文
posted @ 2018-01-16 17:03 星朝 阅读(417) 评论(0) 推荐(0)
摘要: mapperLocations属性通配符的使用 示例: [html] view plain copy print?<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> 阅读全文
posted @ 2018-01-16 16:59 星朝 阅读(9486) 评论(0) 推荐(0)
摘要: 1.在maven工程中的resource中创建generatorConfig.xml 配置generatorConfig.xml的 <?xml version="1.0" encoding="UTF 8"?> <!DOCTYPE generatorConfiguration PUB 阅读全文
posted @ 2018-01-16 16:18 星朝 阅读(611) 评论(0) 推荐(0)
上一页 1 ··· 441 442 443 444 445 446 447 448 449 ··· 507 下一页