- 博客(154)
- 资源 (10)
- 问答 (1)
- 收藏
- 关注
原创 idea将maven引用包打包到一个目录
首先使用maven管理的项目,然后现在的这些jar包呢,都是在本地仓库里面的,要是一个个找,那得找到什么时候。下面是如何快速导出项目使用的所有依赖jar包使用的命令:dependency:copy-dependencies -DoutputDirectory=lib选择Maven Projects运行之后,会在项目中生成的lib文件夹, 打开lib文件夹,看到所有的导出...
2019-10-15 20:47:30
1128
原创 mongodb 实现case when 自定义排序
mongdob实现类似数据库order by (case lczc = 1 when 100 else lczc) 的排序方式db.doctorinfo.aggregate({ "$match" : { "cityId" : 118}}, { "$project" : {"deptName" : 1 ,"doctorName":1,"doctorSn":1, "doctorUid" ...
2019-10-15 20:43:39
4305
1
原创 mongodb aggregate函数查看计划
db.doctorinfo.aggregate([ { "$match" : {"provinceId":13, "doctorService_phone" : "1" , "displayStatus" : 1}},{ "$group" : { "_id" : { "standardDeptId" : "$standardDeptId"} , "standardDeptId" : { "$...
2019-10-15 20:42:11
2739
原创 mongodb查询字段是否存在
db.集合.函数({字段:{$exists:true}})案例:db.doctorinfo.count({zxExtendKey:{$exists:true}})
2019-10-15 20:40:51
4392
原创 修改mongodb列类型
db.文档.find({"列":{$type:Type Number}}).forEach( function(x){ x.列=new NumberInt(x.列); db.文档.save(x); } ); 例如:db.doctorArticle.update({Article_Type: { $ne : 2 }},{$set:{Article_Type:new NumberI...
2019-10-15 20:39:22
303
原创 oracle级联删除
oracle中使用on delete cascade和on delete set null来建立外键其面我们介绍了创建外键约束时如果使用oracle默认的创建方式,在删除被参照的数据时,将无法被删除,这一点在oracle9i中给了我们更多灵活的选择,我们可是使用on delete cascade和 on delete set null关键字来决定删除被参照数据时是否要将参照这个数据的那些数据一并...
2019-10-15 20:33:42
288
原创 插入千万测试数据
drop table student;drop table st_class;drop table st_scoredrop sequence SEQ_st_class;drop sequence SEQ_student;drop sequence seq_st_score;--创建学生表create table student( st_id NUMBER not nul...
2019-10-15 20:33:31
214
原创 maven项目test执行main找不到资源文件
在test下直接执行main方法会导致找不到资源文件,发现是Test output path下的目录没有资源文件,导致加载不到。在pom.xml中配置增加以下配置后执行test目录下的main方法成功<build> <testResources> <testResource> ...
2019-10-15 11:40:02
3967
原创 extjs4.1 复选框 联动菜单
var treeStore = Ext.create('Ext.data.TreeStore', { root : { expanded : true, children : [{ text : "detention", leaf : true }, { text : "homework", expand...
2013-06-26 14:18:32
263
原创 根据request给实体类设值
/** * 根据request给实体类设值 * * @author 2011-1-14 * @param objClass * @param request * @return */ public static Object setBeanProperty(Class objClass, HttpSer
2013-06-26 14:18:30
214
原创 jsp页面导出保存word或Excel几种方法及个人总结
以下是本人在做EXCEL/WORLD中在网上找的方法及个人总结:方法1:<%@ page contentType="application/msword; charset=GBK" %> //或者vnd.ms-word<%@ page contentType="application/msexcel; charset=GBK" %> //或者vnd.ms-excel...
2013-06-26 14:18:27
274
原创 重写EXT树的双击事件,让双击不展开子节点
//重写树的双击事件,让双击不展开子节点Ext.override(Ext.tree.TreeNodeUI, { onDblClick : function(e) { e.preventDefault(); if (this.disabled) { return; } if (this.checkbox) { this.toggleChec
2013-06-26 14:18:25
344
原创 ibatis时间查询
<isNotEmpty prepend="and" property="begin_create_time"> CREATE_TIME >= to_date(#begin_create_time#,'yyyy-MM-dd HH24:MI:SS')</isNotEmpty><isNotEmpty prepend="and" property="end...
2013-06-26 14:18:23
218
原创 spring+ibatis的批量提交
public int addSendMsg(final Msg msg) { this.getSqlMapClientTemplate().execute(new SqlMapClientCallback() { public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
2013-06-26 14:18:21
248
原创 ibatis<iterate>标签
对ibatis标签<iterate>的理解,在看ibatis文档时,就看见过这个标签,并且还对其不是很了解,一直没有到现在,在工作中用到了这个标签时,才去了解了一下这个标签的具体含义。先把文档中对该标签的介绍贴出来一起分享。Iterate:这属性遍历整个集合,并为List集合中的元素重复元素体的内容。Iterate的属性:prepend - 可被覆盖的SQL语句组成部分,添...
2013-06-26 14:18:19
248
原创 配置让对象交到spring的CGLIB中
<!-- 方法权限认证AOP配置 --> <aop:config proxy-target-class="true"> <aop:aspect id="methodSecurityInterceptorAspect" ref="methodSecurityInterceptor"> <aop:pointcut id="methodSecur...
2013-06-26 14:18:17
203
原创 SQLGrammarException: could not execute query
could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query解决方法:一般是hibernate 配置文件的用户名与表的用户名不一致
2013-06-26 14:18:13
319
原创 struts2 文件上传
1.导入struts的包commons-logging-1.0.4.jarfreemarker-2.3.8.jarognl-2.6.11.jarstruts2-core-2.0.6.jarxwork-2.0.1.jarcommons-io-1.1.jar2.建立jsp页面2.1 先将表单的提交方式设为POST,然后将enctype设为multipart/form-data2.2 ...
2013-06-26 14:18:11
201
原创 According to TLD or attribute directive in tag file, attribute href does not acc
According to TLD or attribute directive in tag file, attribute href does not accept any expressions解答:这种情况当在页面上使用${} EL表达式来取值就出现的错误,把${}改为%{}就可以了。
2013-06-26 14:18:09
244
原创 struts2 标签s_iterator
struts2的s:iterator 可以遍历 数据栈里面的任何数组,集合等等 以下几个简单的demo:s:iterator 标签有3个属性: value:被迭代的集合 id :指定集合里面的元素的id status 迭代元素的索引1:jsp页面定义元素写法 数组或list A 打印结果为: 1A2A3A4A5A2:索引的用法如果
2013-06-26 14:18:07
155
原创 struts2 result type的值
Result类型Webwork提供了一些com.opensymphony.xwork.Result接口的实现来使你的action可以容易的用户交互.这些Result类型包括:Chain - 用于 Action ChainingDispatcher - 用于 JSP 整合FreeMarker - 用于 FreeMarker 整合HttpHeader - 用于控制特殊的HTTP行为Jasp...
2013-06-26 14:18:04
197
原创 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException解决办法:是因为spring的配置文件有错误,或者没写完整.
2013-06-26 14:18:02
225
原创 spring scope头文件相应在配置
所有用自己的spring文件的注意:务必用以下方法来做,头部使用方法1.<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd"> ...
2013-06-26 14:18:00
197
原创 if标签
s:if 标签<s:if test="#session.totalRecord>3"></s:if><s:if test='%{STATE== "A"}'></s:if>c:if 标签<c:if test="${STATE=='A'}"> ddd</c:if>但是没有c:else标签...
2013-06-26 14:17:58
209
原创 ibatis调用存储过程
ibatis xml中<!-- 调用存储过程来生成考生试卷 --> <parameterMap class="java.util.HashMap" id="examinee" > <parameter property="result" jdbcType="VARCHAR" javaType="java.lang.String" mode="OUT"/&g...
2013-06-26 14:17:56
225
原创 There is no statement named ExaminerInfo.queryExaminerInfoByMap in this SqlMap
There is no statement named ExaminerInfo.queryExaminerInfoByMap in this SqlMap解答:1.可能是名字写错. 2.没有把配置文件写到主配置里去
2013-06-26 14:17:54
209
原创 ibaits事务
public boolean addOrderMenu(OrderClass orderClass,OrderMenu orderMenu){ try { // 启动事务 definition.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); this.status = transa
2013-06-26 14:17:52
199
原创 hibernate+spring会话自动关闭
spring2.x+hibernate3+struts2 在首次登陆系统时抛出的异常,再登陆就正常。异常:javax.servlet.ServletException: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transacti...
2013-06-26 14:17:50
336
原创 hibernate生成实体规则
package com.jn0812a.crm.commons.utils;import org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy;import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;import org.hibernate.cfg.reve...
2013-06-26 14:17:48
263
原创 配置tomcat首页
这是配置tomcat首页的。把这个文件解压到tomcat的conf目录下解压后的目录为:conf/catalina/localhost/ROOT.xml在root里配置就跟配连接池一样的方式1.<Context path="/" reloadable="true" docBase="D:\ROOT" workDir="D:\ROOT" />path:不用改。docBase w...
2013-06-26 14:17:43
211
原创 Failed to install Tomcat6 service. Check your settings and permissions Ignore an
错误提示:Failed to install Tomcat6 service. Check your settings and permissions Ignore and continue anyway错误原因:以前安装过Tomcat 删除时只是简单的删除了文件夹,服务并未删除解决问题步骤:开始-->运行-->cmd-->确定-->输入sc delete tomcat5 或 sc delet
2013-06-26 14:17:41
280
原创 PowerDesigner显示注释
自增列是在pdm中设置的选择那个表,右键-> Properties-> Columns-> Customize Columns and Filter(或直接用快捷键Ctrl+U)-> 选上identity就可以了啊。
2013-06-26 14:17:37
180
原创 PDM图形窗口中显示注释
'******************************************************************************'* File: comment2name.vbs'* Purpose: 在PowerDesigner的PDM图形窗口中显示数据列的中文注释'* Title: 将字段的comment赋值到字段的name中'* Cat...
2013-06-26 14:17:35
222
原创 MyEclipse假死
那个网站是java的网站,所以说跟你的myeclipse没有关系。是不是你的jre的 javadoc Location连接到java网站上了。你输入了以后会卡,说明他在根据你的引用去找方法,方法哪里找? 貌似就去那个网站了。Windows-->java-->Installed Jres-->选中你的版本-->Edit-->选中jar包-->Javadoc ...
2013-06-26 14:17:33
188
原创 MyEclipse改jre
MyEclipse改jrewindows->preferences->java->installedjres在这里编辑或者添加jre.
2013-06-26 14:17:30
241
原创 linux下查看tomcat控制台
linux下查看tomcat控制台登录linux系统后,进入tomcat/logs/文件夹下输入:tail -f catalina.out-f:时时刷新
2013-06-26 14:17:28
305
原创 在action取到页面的数据为符号分隔的字符串时
如果页面传过来的值是一个以"符号"分隔的字符串时,如果其中字符串的值不为空则无事,如果其中字符串的值为空时在action中使用split来分割时就出现个数不足...比如字符串为 [a,b,c] split后个数为 3字符串为 [,,] split后个数为 0解决方法 split(",",-1) -1表示为空时也当一个对象...
2013-06-26 14:17:26
214
原创 Swing设置滚动条的默认大小
textManage = new JTextArea();textManage.setLineWrap(true); // 自动换行JScrollPane jsPanel = new JScrollPane(textManage);jsPanel.setPreferredSize(new Dimension(100,100)); //设置滚动条的默认大小这样设置不会有默认滚动条出
2013-06-26 14:17:24
391
eclipse打开文件夹OpenExplorer.jar
2016-11-10
XMLSpyEntv2011r2sp1b_x64_ZH key生成器
2011-12-23
哪个论坛系统有以下功能,哪位知道介绍下
2012-07-13
TA创建的收藏夹 TA关注的收藏夹
TA关注的人