摘要: 转自:https://kanpiaoxue.iteye.com/blog/2151903 我们使用spring写junit单测的时候,有的时候我们的spring配置文件只有一个。我们在类的注释上面会这样写: Java代码 @RunWith(SpringJUnit4ClassRunner.class) 阅读全文
posted @ 2017-10-23 23:49 Sharpest 阅读(321) 评论(0) 推荐(0) 编辑
摘要: oracle查询用户下的所有表 select * from all_tab_comments – 查询所有用户的表,视图等 select * from user_tab_comments – 查询本用户的表,视图等 select * from all_col_comments –查询所有用户的表的列 阅读全文
posted @ 2017-10-23 22:35 Sharpest 阅读(2008) 评论(0) 推荐(0) 编辑
摘要: 今天想要将Oracle数据库中 有规律命令的表删除掉,好想一次性干掉……不过没成功……所以退而求其次 先查询想要干掉的表,并且拼接成sql 语句 select 'drop table ' ||table_name ||';' from user_tab_comments where table_na 阅读全文
posted @ 2017-10-23 22:30 Sharpest 阅读(2695) 评论(0) 推荐(0) 编辑
摘要: 1、delete from t 2 、truncate table t 区别: 1、delete是dml操作;truncate是ddl操作,ddl隐式提交不能回滚 2、delete from t可以回滚,truncate table t 不可以回滚 3、 truncate table t 执行效率更 阅读全文
posted @ 2017-10-23 22:23 Sharpest 阅读(14983) 评论(0) 推荐(0) 编辑
摘要: 转自:https://nannan408.iteye.com/blog/1754882 1.前言。 在声明式的事务处理中,要配置一个切面,即一组方法,如 Java代码 <tx:advice id="txAdvice" transaction-manager="txManager"> <tx:attr 阅读全文
posted @ 2017-10-23 21:35 Sharpest 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 转自:https://blog.csdn.net/launch_225/article/details/7814346 原来是这样设置的: Xml代码 <tx:attributes> <tx:method name="*" read-only="true"/> </tx:attributes> 发现 阅读全文
posted @ 2017-10-23 21:32 Sharpest 阅读(751) 评论(0) 推荐(0) 编辑
摘要: applicationContext.xml: 2. applicationContext-action.xml: 转自:https://blog.csdn.net/qq_34137397/article/details/72823031 3. applicationContext-dao.xml: 阅读全文
posted @ 2017-10-23 21:27 Sharpest 阅读(525) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.cnblogs.com/waliy/p/4570301.html 只要在hibernate.cfg.xml添加这句话,就可以自动生成数据表 <property name="hibernate.hbm2ddl.auto">update</property> update: 阅读全文
posted @ 2017-10-23 18:14 Sharpest 阅读(2130) 评论(0) 推荐(0) 编辑
摘要: 转自“”:https://blog.csdn.net/baidu_18607183/article/details/5248671 1 实现包含了Hibernate与数据库的基本连接信息的配置方式有两种方式: 第一种是使用hibernate.properties文件作为配置文件。 第二种是使用hib 阅读全文
posted @ 2017-10-23 18:11 Sharpest 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.cnblogs.com/LJWDL/archive/2013/11/15/3426226.html 第一次用hibernate自动生成表,涉及到多个表的外键,用到了@OneToMany和@ManyToOne注解碰到了几个错误。 首先声明一个基础,@OneToMany和@ 阅读全文
posted @ 2017-10-23 17:56 Sharpest 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 一次连接数据库怎么也连接不上,查了多方面资料,终于找到答案,总结 首先应该保证数据库的服务启动 在myeclipse的数据库视图中点 右键->new 弹出database driver的窗口, Driver template选择oracle(thin driver), Driver name 输入o 阅读全文
posted @ 2017-10-23 17:49 Sharpest 阅读(226) 评论(0) 推荐(0) 编辑
摘要: - 一个请求过来,走前端控制器StrutsPrepareAndExecuteFilter -前端控制器是一个过滤器,过滤器中的核心方法是doFilter(),doFilter方法中首先处理了字符集,然后将request和response方法 放到ThreadLocal中 ,表示线程安全 -接下来,判 阅读全文
posted @ 2017-10-23 17:02 Sharpest 阅读(569) 评论(0) 推荐(0) 编辑