将类交给spring管理,你确定不会出问题?(求大神指导) [问题点数:40分,结帖人z1246879396]

Bbs2
本版专家分:154
结帖率 88.89%
Bbs3
本版专家分:807
自己new的对象怎么注入spring管理的对象
本文主要参考了以下两篇博客,然后将两者整合起来kenick的博客 http://blog.csdn.net/leadseczgw01/article/details/53941871飞飞狐的博客 http://blog.csdn.net/xiefeifeihu/article/details/5701436正文:    我这里主要是想在项目中运用装饰者模式,但是因为自己new出来的装饰者servi...
Spring框架的核心作用是把对象的创建交给spring进行管理
.ioc底层原理使用技术 (1)xml配置文件 (2)dom4j解析xml (3)工厂设计模式 (4)反射
spring管理和实例化对象的四种方式
用<em>spring</em><em>管理</em>和实例化对象的四种方式 方式一:无参构造函数(最常用) 对象是<em>spring</em>创建,创建的对象还要<em>交给</em><em>spring</em>容器<em>管理</em> bean:豆子 id:在<em>spring</em>容器中Hello对象的名,在容器中id的值必须唯一 class:要对哪个类实例化对象,遵守 包名.类名 底层:Object obj=Class.forName(“包名.类名”).newInstance();(反射原理) 如何断...
Spring框架的好处,为什么要用Spring?
1.方便解耦,便于开发(Spring就是一个大工厂,可以将所有对象的创建和依赖关系维护都<em>交给</em><em>spring</em><em>管理</em>) 2.<em>spring</em>支持aop编程(<em>spring</em>提供面向切面编程,可以很方便的实现对程序进行权限拦截和运行监控等功能) 3.声明式事务的支持(通过配置就完成对事务的支持,不需要手动编程) 4.方便程序的测试,<em>spring</em> 对junit4支持,可以通过注解方便的测试<em>spring</em> 程序 ...
将struts2的action交给spring管理及注意事项
  将struts2中的action<em>交给</em><em>spring</em><em>管理</em> 1.xml方式 applicationContext.xml   &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt; &amp;lt;beans xmlns=&quot;http://www.<em>spring</em>framework.org/schema/beans&quot; xmlns:xsi=&quot;http://www.w...
将redis交给spring管理
首先是通过bean在配置文件中配置 然后是设置构造方法的参数,注意的是顺序,以及类型 如下所示 然后是注入的时候注入的就是这个id所以是要设置这个id的,就是这样
将action交给spring管理,找不到action
由于用了@Resource方式注解,所以要将action<em>交给</em><em>spring</em><em>管理</em>。于是在sturts.xml文件中加入了rn这句话。rn但访问action的时候一直报404错。求高手解答。谢谢!
交给spring管理的bean
请教一下,什么样的bean,应该<em>交给</em><em>spring</em><em>管理</em>,就是要在applicationContext.xml中配置的?rnrn比如在LoginAction中,Service应该配置进applicationContext.xml,那User用吗?rnrnrnrnrn[color=#339966]--------------------------------------------------------------------rn以下内容为自动编辑的内容,并非楼主的发贴内容,此仅用于显示而已,并无任何其他特殊作用rn楼主【kevoo】截止到2008-08-05 13:16:22的历史汇总数据(不包括此帖):rn发帖的总数量:14 发帖的总分数:60 每贴平均分数:4 rn回帖的总数量:32 得分贴总数量:8 回帖的得分率:25% rn结贴的总数量:14 结贴的总分数:60 rn无满意结贴数:11 无满意结贴分:225 rn未结的帖子数:0 未结的总分数:0 rn结贴的百分比:100.00% 结分的百分比:100.00% rn无满意结贴率:78.57 % 无满意结分率:375.00% rn敬礼![img=http://p.blog.csdn.net/images/p_blog_csdn_net/java2000_net/381633/o_medal1.gif][/img][/color]rn取消马甲机器人,请点这里:[url=http://www.java2000.net/mycsdn/robotStop.jsp?usern=kevoo][/url]
Qtopia出问题大神指导、、
我的板子是MINI2440 不知道怎么了 打开后 一直显示Starting Qtopia 然后就一直没动静了 、、、
如何让不受spring管理的类具有spring自动注入的特性.--AutowireCapableBeanFactory
package <em>spring</em>.core.pracitce; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import org.apache.commons.lang3.StringUtils; import org.junit.Test; import
Spring:普通的Java类获取由Spring所管理的Bean
一般情况下,在使用Spring注解的方式<em>管理</em>bean时,只能通过注解或者配置文件注入的方式获取相应的bean。普通的类直接注入是注入不进去的。所以我们先编写一个上下文工具类。 package cn.chao.wx.util; import org.<em>spring</em>framework.beans.BeansException; import org.<em>spring</em>framework.context.Ap...
建立你的第一个spring工程(下)
接上回,一个基本的java web已经建立好,那么怎么样才能把它变成<em>spring</em>工程呢?首先我们需要在pom.xml里面配置对<em>spring</em>的依赖(就是引入<em>spring</em>的jar包),pom.xml里面指示了所有maven的依赖,也就是说你从maven上需要取什么东西,就在这里配置好,maven会自动去把这个东西拿到我们的工程里面去。可以用看到在&amp;lt;dependency&amp;gt;之间的部分就是所引入...
spring项目下包名
项目初始格式:com.公司名.项目名 dao 数据持久层,数据库操作的方法。 daoImpl 数据库操作的方法的具体实现。 service 业务逻辑的方法。 serviceImpl 业务逻辑处理的方法的具体实现。 entity/model 实体类,建立各个对象。 utils 工具类,写可以调用的方法。 controller 负责具体的业务模块流程的控制。 bean 数据的载体。 component...
整合SSH框架时,SESSIONFACTORY创建失败,以下是错误代码
-
大神指导大神指导大神指导
1>main.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall CSpeechRecognition1::CSpeechRecognition1(void)" (??0CSpeechRecognition1@@QAE@XZ),该符号在函数 "public: __thiscall main::main(class CWnd *)" (??0main@@QAE@PAVCWnd@@@Z) 中被引用rn1>main.obj : error LNK2001: 无法解析的外部符号 "public: virtual int __thiscall main::OnInitDiaLog(void)" (?OnInitDiaLog@main@@UAEHXZ)rn1>main.obj : error LNK2019: 无法解析的外部符号 "public: virtual __thiscall CSpeechRecognition1::~CSpeechRecognition1(void)" (??1CSpeechRecognition1@@UAE@XZ),该符号在函数 "public: virtual __thiscall main::~main(void)" (??1main@@UAE@XZ) 中被引用rn1>D:\tttttt\RecordSpeech\Debug\RecordSpeech.exe : fatal error LNK1120: 3 个无法解析的外部命令
大神指导!orz!authpuppy安装出问题。。。。
安装authpuppy时,在第三步出现The requested URL /authpuppy/web/install/3 was not found on this server 问题,查找好长时间都不知道如何解决[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/34.gif][/img],<em>大神</em>求<em>指导</em>!
大神指导关于gzip解压,出问题
我从http上下载了gizp格式的数据,用解压缩软件已经解压成功,我现在想自己写解压代码,发现解压之后的都是空白,不知道什么原因,解压代码如下[code=css]#include rn#include "zlib.h" rn#pragma comment(lib, "./zlib1.lib") rnrnint main()rn rn /* 原始数据 */rn FILE* p=fopen("mysocket_test.gzip","rb+");rn FILE* p2=fopen("123.txt","wb");rn rn unsigned char buf[104857] = 0; rn unsigned char strDst[104857] = 0; rn unsigned long bufLen = sizeof(buf); rn unsigned long dstLen = sizeof(strDst); rn fread(buf,1,145910,p); rn rn /* 解压缩 */ rn uncompress(strDst, &dstLen, buf, 145910); rn printf("%s\n",strDst);rn fwrite(strDst,1,dstLen,p2);rn return 0; rn rn[/code]其中mysocket_test.gzip放着的是gzip压缩的数据,大小是145910.
期末作业 不会啊,求大神指导
[img=https://img-bbs.csdn.net/upload/201412/31/1420003077_204357.jpg][/img]
struts交给spring管理
HTTP Status 500 - Unable to instantiate Action, EmployeeAction, defined for ‘employee_login’ in namespace '/'EmployeeAction
手动创建动态代理对象bean到spring容器
一般编写<em>spring</em> boot starter时都涉及到自动配置,自动配置的的实现都涉及的手动注册bean到容器和从容器获取bean。 一般的情况下,自动配置的方式可以参考<em>spring</em>-boot自动配置(AutoConfiguration)的实现,来定义我们的自定义自动配置,参考: <em>spring</em> boot自动配置原理 开入以下所有是一个zookeeper的自动创建连接的类,并且将连接bean...
单元测试被spring管理的类(如service实现类)中的私有方法
发放
怎样在普通类中使用被spring管理的bean
在使用<em>spring</em>做开发的时候,有时候会碰到的一个问题是----怎样在普通的类(不被<em>spring</em><em>管理</em>、没有注入到<em>spring</em>容器中)中调用<em>spring</em>容器中的bean? 因为调用方是普通类,不是被<em>spring</em><em>管理</em>的bean,所以依赖注入是没法用了。那么,有没有解决办法呢?当然是有的。网上的教程提供了很多种方法,而本文只讲解个人认为最简单的一种----那就是利用<em>spring</em>提供的Applicatio...
Spring管理工具类的方法
在开发中,我们经常会定义一些工具类,这些类中一般都是静态方法。使用时,直接使用类名.方法名调用即可,无需把工具类实例化。例如如下的工具类: public class Test { public static int add(int a, int b) { return a + b; } } 使用时, 直接调用 int result = Test.add...
spring 中如果使用new创建一个对象时 这个对象将不在受spring管理管理
文章如标题具体如下 比如现在有一个service 层 package com.zyc.service.impl; import javax.annotation.Resource; import org.<em>spring</em>framework.stereotype.Service; import com.zyc.dao.Data1Dao; import com.zyc.service.Da
struts2 交给spring 管理
请问下 ,struts2 本身是线程安全的,每次都会创建新的对象,但是,当他<em>交给</em><em>spring</em>生成后,没有指定actionbean的scope范围为prototype,那这个action是不是只有一个实例了? 每次请求都是同一个实例吗?
将状态栏交给application管理
-
不会指导
裁剪pictureBox1里800*400的图片显示到pictureBox2里并保存,参数好像不太对rnpublic static void MakeThumbnail(string originalImagePath, string thumbnailPath, int width, int height, string mode, Boolean Replace, Boolean Delete)rnrnSystem.Drawing.Image originalImage = System.Drawing.Image.FromFile(originalImagePath);rnint towidth = width;rnint toheight = height;rnint x = 0;rnint y = 0;rnint ow = originalImage.Width;rnint oh = originalImage.Height;rnswitch (mode)rnrncase "HW":rnbreak;rncase "W":rntoheight = originalImage.Height * width / originalImage.Width;rnbreak;rncase "H":rntowidth = originalImage.Width * height / originalImage.Height;rnbreak;rncase "Cut":rnif ((double)originalImage.Width / (double)originalImage.Height > (double)towidth / (double)toheight)rnrnoh = originalImage.Height;rnow = originalImage.Height * towidth / toheight;rny = 0;rnx = (originalImage.Width - ow) / 2;rnrnelsernrnow = originalImage.Width;rnoh = originalImage.Width * height / towidth;rnx = 0;rny = (originalImage.Height - oh) / 2;rnrnbreak;rndefault:rnbreak;rnrnrnrnSystem.Drawing.Image bitmap = new System.Drawing.Bitmap(towidth, toheight);rnGraphics g = System.Drawing.Graphics.FromImage(bitmap);rng.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;rng.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;rng.Clear(Color.Transparent);rng.DrawImage(originalImage, new Rectangle(0, 0, 800, 400),rnnew Rectangle(1100,800,3000,2000),rnGraphicsUnit.Pixel);rnrnrn//originalImage.Dispose();rnrnrnrnrnrnrnrnrntryrnrnbitmap.Save(thumbnailPath, System.Drawing.Imaging.ImageFormat.Jpeg);rnrncatch (System.Exception e)rnrnthrow e;rnrnfinallyrnrnoriginalImage.Dispose();rnbitmap.Dispose();rng.Dispose();rnrnrnrnrnprivate void button2_Click(object sender, EventArgs e)rnrnMakeThumbnail(pictureBox1.Image, pictureBox2.Image,3000,1000,"W", false, true);rnrnrnrn
大神指导spring mybatis整合一些问题
[code=java]rn rn rn 未读rn 已读rn 其他rn rn $list.sendUid rn $list.receiverUid rn $list.title rn rn 查看 删除rn rn [/code]rn如上代码..我想的是,在运行的时候,把$list.sendUid 和$list.receiverUid 这2个uid,在去执行给换成对应表里边的name,如何实现?[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/11.gif][/img]rn要不还得弄2表查询,得写实体类好麻烦....
spring 配置dubbo报错 求大神指导
Multiple annotations found at this line:rn - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:module'.rn - schema_reference.4: Failed to read schema document 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd', because 1) could not find the document; rn 2) the document could not be read; 3) the root element of the document is not .
spring 管理bean,能否new对象
dao层引用了一个对象 public List getRptHead(String rno)throws Exception { // TODO Auto-generated method stub
spring项目中普通类如何得到spring容器管理的bean
今天碰到要在ssh项目中的一个普通类中访问<em>spring</em>容器<em>管理</em>的bean,现在找到一种解决办法,不知道是否是优化的,先记录下来,以免下次又要狂搜索。 [code=&quot;java&quot;]package com.**; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; imp...
spring3将普通的java类纳入到spring的容器中进行管理
@Configuration public class CategoryUtil { public static ICategoryService categoryService; private int pid; @Autowired public void setCategoryService(ICategoryService categoryService) { Sys
utils工具类需要spring注入对象
最近优化代码的时候,遇到了个小问题,写了一个公共方法好几个controller要使用,所以要提取工具类,但是涉及到了static的工具类中通过sprin注入对象问题。然后查了度娘得出解决办法,上代码记录一下。 需要加上@component注解把工具类让<em>spring</em>扫描到,bean<em>交给</em><em>spring</em><em>管理</em> @Component public class StaticUtils { 这
Spring管理线程
Spring<em>管理</em>线程对象,通过Spring容器把Bean、Service等业务类注入到线程对象中
tomcat出问题了,求大神
如图,请问是怎么回事[img=https://img-bbs.csdn.net/upload/201611/26/1480125519_641598.jpg][/img]
代码混淆出问题,求大神
Unexpected error while editing code:n Class = [com/ad/control/AdService]n Method = [a(Lcom/ad/view/d;)V]n Exception = [java.lang.IllegalArgumentException] (Invalid instruction offset [65837] in code with length [302])nUnexpected error while shrinking instructions after partial evaluation:n Class = [com/ad/control/AdService]n Method = [a(Lcom/ad/view/d;)V]n Exception = [java.lang.IllegalArgumentException] (Invalid instruction offset [65837] in code with length [302])nNot optimizing this methodnUnexpected error while editing code:n Class = [com/ad/control/AdService]n Method = [b(Lcom/ad/view/d;)V]n Exception = [java.lang.IllegalArgumentException] (Invalid instruction offset [65821] in code with length [286])nUnexpected error while shrinking instructions after partial evaluation:n Class = [com/ad/control/AdService]n Method = [b(Lcom/ad/view/d;)V]n Exception = [java.lang.IllegalArgumentException] (Invalid instruction offset [65821] in code with length [286])nNot optimizing this methodnUnexpected error while editing code:n Class = [com/ad/control/d]n Method = [a(Lcom/ad/view/d;)V]n Exception = [java.lang.IllegalArgumentException] (Invalid instruction offset [65756] in code with length [221])nUnexpected error while shrinking instructions after partial evaluation:n Class = [com/ad/control/d]n Method = [a(Lcom/ad/view/d;)V]n Exception = [java.lang.IllegalArgumentException] (Invalid instruction offset [65756] in code with length [221])n 混淆后出现上面的问题,不知道是不是哪个没有keep住,求会混淆的<em>大神</em>帮忙
大神指导ASP.NET MVC4将excel导入数据库
最近在做一个项目涉及到将excel中的数据批量导入到数据库中,本人新手,希望<em>大神</em><em>指导</em>,最好有例子,不使用第三方控件!!!!!!!急急急急急急急!!!
大神指导指导一下
[img=https://img-bbs.csdn.net/upload/201505/27/1432717312_644686.jpg][/img][b][img=https://img-bbs.csdn.net/upload/201505/27/1432717340_762836.jpg][/img][img=https://img-bbs.csdn.net/upload/201505/27/1432717366_514225.jpg][/img][/b]
大神指导 mfc类的调用
已经设计好一个类了,我想新建一个单文档 然后点菜单弹出对话框,接着是在对话框中添加控件,想引入那个已经设计好的类,让它去控制控件。。怎么弄?
Spring线程池结合Spring托管线程类
Spring线程池结合Spring托管线程Bean @Component 注释声明Spring的托管Bean @Scope(&quot;prototype&quot;)  注释说明为“多例”   package com.test.thread; import org.<em>spring</em>framework.context.annotation.Scope; import org.<em>spring</em>framewo...
Spring如何管理Java普通类(Java类获取Spring容器的bean)
Spring如何<em>管理</em>Java普通类 Java类获取Spring容器的bean 获取<em>spring</em>的ApplicationContext
怎么把一个jar包里的类交给spring管理并进行aop
我对<em>spring</em>不太熟悉,所以也不知道这个需求是不是有点奇怪:现在有个jar包,我们自己写的类继承自jar包里的某个类,平时使用就是new一个对象出来,能不能将jar包里的这个类让<em>spring</em><em>管理</em>进行
spring boot普通类使用spring管理的对象
我们在普通类里如果想调用已经被<em>spring</em><em>管理</em>的对象,在Spring中,我们会在Controller层使用自动注入的Service层,在Service层使用自动注入的Dao层,如果想在普通的类中使用自动注入Service或者是Dao层时,可以这样做:我们有两种方式: 第一种方法: public class TestJsoup { public NewsDao newsdao; publi
普通java类获取spring容器的方法
参考文章连接 实现ApplicationContextAware接口会往实现类里面启动的时候注入一个applicationContext  工具类SpringContextUtils import org.<em>spring</em>framework.beans.BeansException; import org.<em>spring</em>framework.context.ApplicationContext...
SSH整合方式二:将hibernate的配置交给Spring管理
hibernate + struts2+<em>spring</em>三大框架的整合 SSH整合方式二将hibernate的配置<em>交给</em>Spring<em>管理</em>
SSH整合方式二:将hibernate配置交给Spring管理(十五)
SSH 整合方式二:不带hibernate配置文件 与(十四)中的方式一相比,方式二就是将hibernate配置文件中的属性配置等等,转移到了<em>spring</em>的配置文件中而已,相当于是换了个地方设置这些属性。 配置完成后,就可以将hibernate的配置文件删除。 hibernate配置文件中有哪些内容 数据库连接的配置 Hibernate的相关的属性的配置 方言 显示SQL 格式化SQL … C3...
初学者求大神指导
小弟初学Java遇到一个难题,求<em>大神</em><em>指导</em>。rnrn题目:从键盘输入三个数,并赋值,比较之后按从小到大的顺序输出。
大神指导
小弟用人大金仓是,建立了一个模式mystudy,然后我怎么将建好的一个选课表SC,保存到mystudy这个模式下呢,再有就是怎样可以将表格的打开结果保存到电脑桌面哦??
大神指导~~
//对象创建rn shopmodel.GoodsBean goods=new shopmodel.GoodsBean();rn ToolBean.DB db=new ToolBean.DB();rn String info="";rn String forward="";rn String ext="";rn String url="upload/";rn String picurl="/uploadimage";rn FileInputStream imagefile=null;rn PreparedStatement pstmt=null;rn Connection conn=null;rn rn //处理上传的图片文件rn SmartUpload su=new SmartUpload(); //创建新的上传对象rn long maxsize=200*1024; //设置每个上传文件的大小为200KB rn tryrn su.initialize(this.getServletConfig(),request,response);//初始化rn rn su.setMaxFileSize(maxsize); //限制上传文件的大小rn su.setDeniedFilesList("exe,bat,jsp,htm,html,,");//设定禁止上传的文件。禁止上传罗列的那些及没有扩展名的文件。rn su.setAllowedFilesList("jpg,JPG,gif,GIF"); //设定允许上传的格式rn su.upload(); //上传文件rn //将上传文件保存到指定目录rn su.save(picurl,SmartUpload.SAVE_VIRTUAL);rn rn //获取上传的文件,因为只上传了一个文件,所以可直接获取 rn com.jspsmart.upload.File myfile=su.getFiles().getFile(0);rn if(!myfile.isMissing()) rn String filename=myfile.getFilePathName(); //获取完整的带路径的文件名rn imagefile=new FileInputStream(filename);rn //获取用户提交的其他数据rn Request req=su.getRequest(); rn String cid=req.getParameter("cid");rn String cname=req.getParameter("cname");rn String number=req.getParameter("cnumber");rn String price=req.getParameter("cprice");rn String cintro=req.getParameter("cintro");rn //转换数量和价格的格式rn int cnumber=Integer.parseInt(number);rn float cprice=Float.parseFloat(price);rn rn //将图片存到upload文件夹中,并重命名rn ext=myfile.getFileExt();rn Calendar cal=Calendar.getInstance();rn String newfilename=String.valueOf(cal.getTimeInMillis());rn //String saveurl=request.getRealPath("/")+url;rn //saveurl+=newfilename+"."+ext;rn rn //设置存到数据库中的路径rn String cimage=url+newfilename+"."+ext;rn rn rn rn// java.io.File iofile = new java.io.File(filename); rn// java.io.FileInputStream fis = new java.io.FileInputStream(iofile); rn //写入到GoodsBean中rn// goods.setCid(cid);rn// goods.setCname(cname);rn// goods.setCnumber(cnumber);rn// goods.setCprice(cprice);rn// goods.setCintro(cintro);rn// goods.setCimage(cimage);rn rn int cmark=0;rn rn String sql="insert into goods(cid,cname,cnumber,cprice,cintro,cimage,cpic) values (?,?,?,?,?,?,?)";rn rn conn=db.createConn();rn conn.setAutoCommit(true);rn pstmt=conn.prepareStatement(sql); rn pstmt.setString(1,cid);rn pstmt.setString(2,cname);rn pstmt.setInt(3,cnumber);rn pstmt.setFloat(4,cprice);rn pstmt.setString(5,cintro);rn pstmt.setString(6,cimage);rn //pstmt.setBinaryStream(parameterIndex, x, length)rn //pstmt.setBinaryStream(6,fis,419);rn pstmt.setBinaryStream(7,imagefile,imagefile.available());rn //cmark=pstmt.execute();rn cmark=pstmt.executeUpdate();rn if(cmark==1)rn //myfile.saveAs(saveurl,SmartUpload.SAVE_PHYSICAL); //su.SAVE_PHYSICALrn info="添加成功!";rn //conn.commit();rn forward="c_manager.jsp";rn elsern info="添加失败!";rn forward="c_add.jsp";rn rn rn elsern info="请选择要上传的文件!";rn forward="c_add.jsp";rn rn rn catch(Exception e)rn e.printStackTrace();rn info="添加异常!";rn forward="c_add.jsp";rn finallyrn try pstmt.close();catch(Exception e)rn try imagefile.close();catch(Exception e)rn try conn.close();catch(Exception e)rn rnrn rn request.setAttribute("info",info);rn RequestDispatcher rd=request.getRequestDispatcher(forward);rn rd.forward(request,response);rn rn rnrnrn为什么我添加的时候出现添加异常????
如何在普通Java类中注入(使用)Service等被Spring管理的资源
最近在写项目的时候遇到了一个问题,具体的需求是在普通的Java类中需要调用Service层的方法,一开始傻傻地写了一行 @Autowired private IUserService uservice; 结果发现也没报错啊,调用方法也没问题,就开心地去测试了,结果可想而知,报错了,空指针异常。 然后就想了一些方法,首先说一下思路: 想要获取Spring<em>管理</em>的Bean对象,无非就是...
Spring中pojo管理的问题
java类中,类的属性(field)一般应定义为final,不可变的属性可以构造不可变的类,以增加类的简单性,特别,即使类中属性只有部分不可变,也可以减少对类中可变状态的<em>管理</em>,也就是effective
在非spring管理的类中,使用spring管理的类
/** * 为不是<em>spring</em>所<em>管理</em>的对象,需要引用<em>spring</em><em>管理</em>对象的时候所用的工具类 * @author he_guanhong * */ public class SpringApplicationContext implements ApplicationContextAware{ protected static ApplicationContext context;...
普通类中引用spring 容器管理的bean
今天遇到一个问题,在webservice接口中去注入<em>spring</em><em>管理</em>的类的时候出现了空指针的问题,但是呢,这个webservice类并没有<em>交给</em><em>spring</em>去做统一<em>管理</em>,那么要怎么注入到<em>spring</em>的bean呢?采用如下的方法 WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();  Csr
spring 普通类加入spring管理,spring注入普通java类
applicationContext.xml的配置略 一个普通java类 [code=&quot;java&quot;]package com.test; import org.<em>spring</em>framework.beans.factory.BeanFactory; import org.<em>spring</em>framework.context.support.ClassPathXmlApplicationCo...
求c#大神指导
我想<em>指导</em>为什么创建不了用户 (NGUSER)?????rnrnrnrnrn private void btnSetNg_Click(object sender, EventArgs e)rn rn string strSql = "create user NGUSER identified by '9003' default tablespace std; grant connect,resource to NGUSER ; grant create any sequence to NGUSER ; grant create any table to NGUSER ; grant delete any table to NGUSER ; grant insert any table to NGUSER ; grant select any table to NGUSER ; grant unlimited tablespace to NGUSER ; grant execute any procedure to NGUSER ; grant update any table to NGUSER ; grant create any view to NGUSER ; "; rn rn //"CREATE USER NGUSER PROFILE DEFAULT IDENTIFIED BY 9003 DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;GRANT CREATE ANY TABLE TO NGUSER;GRANT UNLIMITED TABLESPACE TO NGUSER;GRANT CONNECT TO NGUSER;GRANT RESOURCE TO NGUSER;";rn rn tryrn rn Form1.oclConnection.Open();rn rn OracleCommand oclCommand = new OracleCommand(strSql, Form1.oclConnection);rn rnrn MessageBox.Show("创建成功");rnrn /*rn rn rn create user NGUSER identified by 9003; grant create session to NGUSER; grant create table to NGUSER; grant create tablespace to NGUSER; grant create view to NGUSER; rn rn */rnrnrn rn catch (Exception ex)rn rnrn MessageBox.Show("SQL语句出错!\n" + strSql.ToString() + "\n请检查:\n" + ex.ToString());rnrn rn finallyrn rn Form1.oclConnection.Close();rn rn FormEnterDatabase_Load(this,e);rn rn
求jstree大神指导
用jstree插件,遇到一个问题 ,使用jstree checkbox的时候,选中父节点下的所有子节点,父节点才是selected状态,才能拿到父节点的id。 我想知道  怎么只选中父节点下的一个或多个子节点 ,也能拿到父节点的id。如下图 父节点是半选状态  也能拿到父节点和子节点的id。 求<em>大神</em><em>指导</em>~
大神指导,十万火急!!!
如何只用action调用别的网站的查找功能查找地址所在位置?n如:输入自定义接口http://127.0.0.1:8080/WebManagePlatform/inter/hc_ip.do?ip=121.199.26.86n就可以查找ip地址所在位置。n求<em>大神</em><em>指导</em>........n
大神指导
我们需要弹出一个窗口,输入一行字符串,统计其中的单词个数rnrnrn#includern /*输入一行字符串,统计其中有多少单词,单词之间用空格分隔开*/rnvoid main() rnrn char string[81];rn int i,num=0,word=0;rn char c;rn rn gets(string);rn for(i=0;(c=string[i])!='\0';i++)rn if(c=='')rn word=0;rn rn else if(word==0)rn rn word=1;rn num++;rn rn rnprintf("There are %d words in the line.\n",num);rn
菜鸟求大神指导
C++builder 中如何实现树状图,就好像迅雷这样子的[img=https://img-bbs.csdn.net/upload/201308/17/1376730023_128130.jpg][/img]
myeclipse6.5求大神指导
安装了myeclipse6.5版本的,比如在写System.的时候不能带出System这个类中的方法,求解决办法。已重新安装。
大神指导!!!
五月 05, 2017 3:41:57 下午 org.apache.tomcat.util.digester.SetPropertiesRule beginrn警告: [SetPropertiesRule]Server/Service/Engine/Host/Context Setting property 'source' to 'org.eclipse.jst.jee.server:manage' did not find a matching property.rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Server version: Apache Tomcat/7.0.77rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Server built: Mar 28 2017 16:01:48 UTCrn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Server number: 7.0.77.0rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: OS Name: Windows 7rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: OS Version: 6.1rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Architecture: amd64rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Java Home: C:\Program Files\Java\jre7rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: JVM Version: 1.7.0_04-b22rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: JVM Vendor: Oracle Corporationrn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: CATALINA_BASE: E:\yangran\code\manage1\.metadata\.plugins\org.eclipse.wst.server.core\tmp0rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: CATALINA_HOME: D:\develop\apache-tomcat-7.0.77rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:51933rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Dcatalina.base=E:\yangran\code\manage1\.metadata\.plugins\org.eclipse.wst.server.core\tmp0rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Dcatalina.home=D:\develop\apache-tomcat-7.0.77rn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Dwtp.deploy=E:\yangran\code\manage1\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebappsrn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Djava.endorsed.dirs=D:\develop\apache-tomcat-7.0.77\endorsedrn五月 05, 2017 3:41:57 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Dfile.encoding=GBKrn五月 05, 2017 3:41:57 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEventrn信息: Loaded APR based Apache Tomcat Native library 1.2.12 using APR version 1.5.2.rn五月 05, 2017 3:41:57 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEventrn信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].rn五月 05, 2017 3:41:58 下午 org.apache.catalina.core.AprLifecycleListener initializeSSLrn信息: OpenSSL successfully initialized (OpenSSL 1.0.2k 26 Jan 2017)rn五月 05, 2017 3:41:58 下午 org.apache.coyote.AbstractProtocol initrn信息: Initializing ProtocolHandler ["http-apr-8080"]rn五月 05, 2017 3:41:58 下午 org.apache.coyote.AbstractProtocol initrn信息: Initializing ProtocolHandler ["ajp-apr-8009"]rn五月 05, 2017 3:41:58 下午 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 1758 msrn五月 05, 2017 3:41:58 下午 org.apache.catalina.core.StandardService startInternalrn信息: Starting service Catalinarn五月 05, 2017 3:41:58 下午 org.apache.catalina.core.StandardEngine startInternalrn信息: Starting Servlet Engine: Apache Tomcat/7.0.77rn五月 05, 2017 3:41:59 下午 org.apache.catalina.core.ContainerBase startInternalrn严重: A child container failed during startrnjava.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/manage]]rn at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)rn at java.util.concurrent.FutureTask.get(Unknown Source)rn at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1119)rn at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)rn at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)rn at java.util.concurrent.FutureTask.run(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rnCaused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/manage]]rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)rn ... 7 morernCaused by: java.lang.IllegalArgumentException: The servlets named [manage1.Single2Search] and [manage1.Single2Search2] are both mapped to the url-pattern [/Single2Search] which is not permittedrn at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)rn at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2458)rn at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2133)rn at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2094)rn at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2086)rn at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1303)rn at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:888)rn at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5522)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)rn ... 7 morernrnrn
大神指导!谢谢!!
一张Excel表:序号 姓名 时间 备注 第1周描述rn 1 小明 9.15 .. ....rn 2 小红 9.15 aa dddddrn ...rn要把这个界面做到Delphi中去,可以简单修改查询,现在要在数据库里建2张表,第1张表包含前面的几列内容:序号、姓名、时间、备注,还有1张表就是每周描述,因为每周都要更新,请问第2张表怎么建,界面里的“第1周描述”可以变成第2(3、4、5...)周描述,还是也建到第一张表里去,2张的话Delphi的query中SQL语句怎么写???
大神指导!!~~急
Linux挂载存储服务器失败rn存储服务器已经映射到主机,Linux可以发现,并且登录.rn[root@master /]# iscsiadm -m session -o show rntcp: [17] 10.1.1.2:3260,3 iqn.1986-03.com.ibm:2145.cunchu02.node1 (non-flash)rntcp: [18] 10.1.1.21:3260,3 iqn.1986-03.com.ibm:2145.cunchu01.node2 (non-flash)rntcp: [19] 10.1.1.1:3260,3 iqn.1986-03.com.ibm:2145.cunchu01.node1 (non-flash)rn使用的是multipath多路径,配置如下rnblacklist rn devnode "^sda"rnrndefaults rn user_friendly_names yesrn path_grouping_policy multibusrn failback immediatern no_path_retry failrnrn可是在fdisk和partitions中没有发现,我不知道哪里出现错误了rnrn[root@master /]# cat /proc/partitions rnmajor minor #blocks namernrn 8 0 1169920000 sdarn 8 1 204800 sda1rn 8 2 1048576 sda2rn 8 3 1168664576 sda3rn 253 0 52428800 dm-0rn 253 1 4194304 dm-1rn 253 2 1112039424 dm-2rn 7 0 2880 loop0rn 7 1 488281 loop1rn 253 3 204800 dm-3rn[root@master /]# fdisk -lrnWARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.rnrnDisk /dev/sda: 1198.0 GB, 1197998080000 bytes, 2339840000 sectorsrnUnits = sectors of 1 * 512 = 512 bytesrnSector size (logical/physical): 512 bytes / 512 bytesrnI/O size (minimum/optimal): 262144 bytes / 262144 bytesrnDisk label type: gptrnDisk identifier: 795E086A-1F39-4BD1-B589-FB71E3F07825rnrnrn# Start End Size Type Namern 1 2048 411647 200M EFI System EFI System Partitionrn 2 411648 2508799 1G Microsoft basic rn 3 2508800 2339837951 1.1T Linux LVM rnrnDisk /dev/mapper/cl-root: 53.7 GB, 53687091200 bytes, 104857600 sectorsrnUnits = sectors of 1 * 512 = 512 bytesrnSector size (logical/physical): 512 bytes / 512 bytesrnI/O size (minimum/optimal): 262144 bytes / 262144 bytesrnrnrnDisk /dev/mapper/cl-swap: 4294 MB, 4294967296 bytes, 8388608 sectorsrnUnits = sectors of 1 * 512 = 512 bytesrnSector size (logical/physical): 512 bytes / 512 bytesrnI/O size (minimum/optimal): 262144 bytes / 262144 bytesrnrnrnDisk /dev/mapper/cl-home: 1138.7 GB, 1138728370176 bytes, 2224078848 sectorsrnUnits = sectors of 1 * 512 = 512 bytesrnSector size (logical/physical): 512 bytes / 512 bytesrnI/O size (minimum/optimal): 262144 bytes / 262144 bytesrnrnYou must set cylinders.rnYou can do this from the extra functions menu.rnrnDisk /dev/loop0: 2 MB, 2949120 bytes, 5760 sectorsrnUnits = sectors of 1 * 512 = 512 bytesrnSector size (logical/physical): 512 bytes / 512 bytesrnI/O size (minimum/optimal): 512 bytes / 512 bytesrnDisk label type: dosrnDisk identifier: 0x00000000rnrn Device Boot Start End Blocks Id SystemrnrnDisk /dev/loop1: 499 MB, 499999744 bytes, 976562 sectorsrnUnits = sectors of 1 * 512 = 512 bytesrnSector size (logical/physical): 512 bytes / 512 bytesrnI/O size (minimum/optimal): 512 bytes / 512 bytesrnrnrnDisk /dev/mapper/vg1-data1: 209 MB, 209715200 bytes, 409600 sectorsrnUnits = sectors of 1 * 512 = 512 bytesrnSector size (logical/physical): 512 bytes / 512 bytesrnI/O size (minimum/optimal): 512 bytes / 512 bytesrnrnrnrn
新手求大神指导~~~
public class SimpleTypesrn public static void main(String[] args)rn System.out.printf("byte \t数值范围: %d ~ %d\n",Byte.MAX_VALUE, Byte.MIN_VALUE);rn System.out.printf("short \t数值范围:%hd ~ %hd\n",Short.MAX_VALUE, Short.MIN_VALUE);rn System.out.printf("int \t数值范围: %d ~ %d\n",Integer.MAX_VALUE, Integer.MIN_VALUE);rn System.out.printf("long \t数值范围:%ld ~ %ld\n",Long.MAX_VALUE, Long.MIN_VALUE);rn System.out.printf("char \t数值范围: %c ~ %c\n",Character.MAX_VALUE, Character.MIN_VALUE);rn System.out.printf("float \t数值范围: %f ~ %f\n",Float.MAX_VALUE, Float.MIN_VALUE);rn System.out.printf("double \t数值范围:%lf ~ %lf\n",Double.MAX_VALUE, Double.MIN_VALUE);rn rn rnrn为啥char,float,double都不能用呢?我看过这三个都有MAX_VALUE和MIN_VALUE啊。。。求<em>指导</em>。。。rn运行结果如下:rnbyte 数值范围: 127 ~ -128rnshort 数值范围:7fffd ~ ffff8000drnint 数值范围: 2147483647 ~ -2147483648rnException in thread "main" java.util.UnknownFormatConversionException: Conversion = 'l'rn at java.util.Formatter$FormatSpecifier.conversion(Formatter.java:2606)rn at java.util.Formatter$FormatSpecifier.(Formatter.java:2634)rn at java.util.Formatter.parse(Formatter.java:2480)rn at java.util.Formatter.format(Formatter.java:2414)rn at java.io.PrintStream.format(PrintStream.java:920)rn at java.io.PrintStream.printf(PrintStream.java:821)rn at SimpleTypes.main(SimpleTypes.java:7)
oracle大神指导
怎么同时执行查询语句和修改语句
急~~大神指导
我现在在做一个注册登录,用vc#窗体编程,要求用户注册后信息写入txt,修改密码时需要匹配txt中的部分信息,如果匹配成功,可以修改密码;为什么匹配非汉字行的时候可以,匹配汉字行的时候不可以;而且有时候能匹配成功,有时候匹配不成功~~
大神指导SQL
Public Function LoadEQPDailyReport(Optional ByVal AreaNo As String = defString, Optional ByVal EquipmentNo As String = defString, _rn Optional ByVal StartTime As Date = defDateTime, Optional ByVal EndTime As Date = defDateTime, Optional ByVal AdditionalXml As String = "") As Stringrn Dim cnnTemp As OleDb.OleDbConnectionrn Dim daTemp As OleDb.OleDbDataAdapterrn Dim dsTemp As DataSetrn Dim drTemp As OleDb.OleDbDataReaderrn Dim strSQL As Stringrn Dim StartEndTime As Doublern Dim Rows() As DataRowrn Tryrn '//Create connectionrn cnnTemp = objLic.CreateConnection(strConnectionString)rn strSQL = "Select * From tblEQPStateBasis Order By EquipmentState"rn cmmTemp = New OleDb.OleDbCommand(strSQL, cnnTemp)rn drTemp = cmmTemp.ExecuteReader()rn strSQL = " Select (Select ContainareaNo From tblSMDAreaRelation Where ObjectNo = Z.EquipmentNo And ObjectType = 2) AreaNo," & _rn " (Select EquipmentType From tblEQPEquipmentBasis Where EquipmentNo = Z.EquipmentNo) EquipmentType," & _rn " Z.EquipmentNo," & _rn " 0 Moves"rn StartEndTime = DateDiff(DateInterval.Second, StartTime, EndTime)rn Do While drTemp.Readrn If strDataBaseType = "oracle" Thenrn rn strSQL = strSQL & " ,Nvl(Round(( Select Sum(Least(A.EndTime,To_Date('" & Format(CDate(EndTime), "yyyy/MM/dd HH:mm:ss") & "','YYYY/MM/DD HH24:MI:SS')) -" & _rn " Greatest(A.StartTime,To_Date('" & Format(CDate(StartTime), "yyyy/MM/dd HH:mm:ss") & "','YYYY/MM/DD HH24:MI:SS')))*24*60*60" & _rn " From (Select EquipmentType, EquipmentNo, EquipmentState, StartTime, EndTime From tblEMSEquipmentStateLog" & _rn " UNION All" & _rn " Select EquipmentType, EquipmentNo, EquipmentState, StartTime, SysDate EndTime From tblEMSEquipmentState" & _rn " ) A" & _rn " Where A.StartTime to_date('" & Format(CDate(StartTime), "yyyy/MM/dd HH:mm:ss") & "','YYYY/MM/DD HH24:MI:SS')" & _rn " And A.EquipmentState = " & drTemp("EquipmentState") & _rn " And A.EquipmentNo = Z.EquipmentNo" & _rn " Group By A.EquipmentNo, A.EquipmentState)/" & StartEndTime & "*100,2),0) """ & drTemp("StateName") & """"rn ElseIf DataBaseType = "mssql" Or DataBaseType = "msaccess" Thenrn strSQL = strSQL & " ,ISNull(Round((CAST((Select Sum(DateDiff(Second," & _rn " (Case" & _rn " When A.StartTime > '" & Format(CDate(StartTime), "yyyy/MM/dd HH:mm:ss") & "' Then A.StartTime" & _rn " Else '" & Format(CDate(StartTime), "yyyy/MM/dd HH:mm:ss") & "'" & _rn " End)," & _rn " (Case" & _rn " When A.EndTime < '" & Format(CDate(EndTime), "yyyy/MM/dd HH:mm:ss") & "' Then A.EndTime" & _rn " Else '" & Format(CDate(EndTime), "yyyy/MM/dd HH:mm:ss") & "'" & _rn " End)))" & _rn " From (Select EquipmentType, EquipmentNo, EquipmentState, StartTime, EndTime From tblEMSEquipmentStateLog" & _rn " UNION All" & _rn " Select EquipmentType, EquipmentNo, EquipmentState, StartTime, GetDate() EndTime From tblEMSEquipmentState" & _rn " ) A" & _rn " Where A.StartTime '" & Format(CDate(StartTime), "yyyy/MM/dd HH:mm:ss") & "'" & _rn " And A.EquipmentState = " & drTemp("EquipmentState") & _rn " And A.EquipmentNo = Z.EquipmentNo" & _rn " Group By A.EquipmentNo, A.EquipmentState) as float) /CAST(" & StartEndTime & " AS float))*100,2),0) " & drTemp("StateName")rn End Ifrn Looprn drTemp.Close()rn cmmTemp.Dispose()rn strSQL = strSQL & " From tblEQPEquipmentBasis Z" & _rn " Where Z.EquipmentNo Is Not Null"rn rn If AreaNo <> defString Thenrn strSQL = strSQL & " And (Select ContainareaNo From tblSMDAreaRelation Where ObjectNo = Z.EquipmentNo And ObjectType = 2) = '" & AreaNo & "'"rn End Ifrn rn If EquipmentNo <> defString Thenrn strSQL = strSQL & " And EquipmentNo In ('" & Replace(EquipmentNo, ",", "','") & "')"rn End Ifrn rn If AdditionalXml <> "" Thenrn '//additionalconditionrn strSQL = strSQL & SeparateAddXML_Condition(AdditionalXml)rn End Ifrn strSQL = strSQL & " Order By EquipmentNo"rn '//Select Datarn cmmTemp = New OleDb.OleDbCommand(strSQL, cnnTemp)rn daTemp = New OleDb.OleDbDataAdapter(cmmTemp)rn dsTemp = New DataSetrn daTemp.Fill(dsTemp, "EQPDailyReport")rn If strDataBaseType = "oracle" Thenrn strSQL = " Select EquipmentNo, Sum(B.GoodQty) Moves" & _rn " From tblWIPCont_Equipment A, tblWIPLotLog_Report B" & _rn " Where A.LogGroupSerial = B.LogGroupSerial" & _rn " And A.EndTime Is Not Null " & _rn " And A.EndTime >= To_Date('" & Format(CDate(StartTime), "yyyy/MM/dd HH:mm:ss") & "','YYYY/MM/DD HH24:MI:SS') " & _rn " And A.EndTime < To_Date('" & Format(CDate(EndTime), "yyyy/MM/dd HH:mm:ss") & "','YYYY/MM/DD HH24:MI:SS') " & _rn "Group By EquipmentNo"rn ElseIf DataBaseType = "mssql" Or DataBaseType = "msaccess" Thenrn strSQL = " Select EquipmentNo, Sum(B.GoodQty) Moves" & _rn " From tblWIPCont_Equipment A, tblWIPLotLog_Report B" & _rn " Where A.LogGroupSerial = B.LogGroupSerial" & _rn " And A.EndTime Is Not Null " & _rn " And A.EndTime >= '" & Format(CDate(StartTime), "yyyy/MM/dd HH:mm:ss") & "'" & _rn " And A.EndTime < '" & Format(CDate(EndTime), "yyyy/MM/dd HH:mm:ss") & "'" & _rn "Group By EquipmentNo"rn End Ifrn cmmTemp = New OleDb.OleDbCommand(strSQL, cnnTemp)rn drTemp = cmmTemp.ExecuteReader()rn Do While drTemp.Readrn Rows = dsTemp.Tables("EQPDailyReport").Select("EquipmentNo = '" & drTemp("EquipmentNo") & "'")rn If Rows.Length <> 0 Thenrn Rows(0).Item("Moves") = drTemp("Moves")rn End Ifrn Looprn drTemp.Close()rn cmmTemp.Dispose()rn '//Combine Return Valuern LoadEQPDailyReport = CombineXMLReturnValue("loadeqpdailyreport", "EQPDailyReport", _rn "DataSet", FormatXMLSchema(dsTemp.GetXmlSchema), dsTemp.GetXml, "")rn Catch e1 As Exceptionrn LoadEQPDailyReport = "fail"rn rn Throw 'New Exception("clsReport.LoadEQPDailyReport: " & e1.Message)rn Finallyrn Call objLic.CloseConnection(cnnTemp)rn If Not daTemp Is Nothing Thenrn daTemp.Dispose()rn End Ifrn If Not dsTemp Is Nothing Thenrn dsTemp.Dispose()rn End Ifrn End Tryrn End Functionrnrnrn谁能帮我从里面抠出最终的SQL来,用的是ORACLE数据库
求occi大神指导
我使用的是vs2012 orcale11g客户端 编译时出现链接错误:rn1>------ 已启动生成: 项目: ConnectDatabase, 配置: Release Win32 ------rnrn1> ConnectDatabase.cpprnrn1>ConnectDatabase.obj : error LNK2001: 无法解析的外部符号 "public: static class oracle::occi::Environment * __cdecl oracle::occi::Environment::createEnvironment(enum oracle::occi::Environment::Mode,void *,void * (__cdecl*)(void *,unsigned int),void * (__cdecl*)(void *,void *,unsigned int),void (__cdecl*)(void *,void *))" (?createEnvironment@Environment@occi@oracle@@SAPAV123@W4Mode@123@PAXP6APAX1I@ZP6APAX11I@ZP6AX11@Z@Z)rnrn1>ConnectDatabase.obj : error LNK2001: 无法解析的外部符号 "public: static void __cdecl oracle::occi::Environment::terminateEnvironment(class oracle::occi::Environment *)" (?terminateEnvironment@Environment@occi@oracle@@SAXPAV123@@Z)rnrn1>C:\Users\my\documents\visual studio 2012\Projects\ConnectDatabase\Release\ConnectDatabase.exe : fatal error LNK1120: 2 个无法解析的外部命令rn========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========rnrn代码如下:rn[code=c]rnrn// ConnectDatabase.cpp : 定义控制台应用程序的入口点。rn//rn#include "stdafx.h"rnrn#define WIN32COMMON //避免函数重定义错误rnrn#include rnrnusing namespace std;rnrnusing namespace oracle::occi;rnrnint main()rnrnrnrn Environment *env=Environment::createEnvironment();rnrn cout<<<
大神指导?编译预处理
为什么要进行编译预处理?n编译预处理是怎么进行的?特别想知道这是怎么样一回事!
大神指导怎么做
939. 占位~rn题目描述rn(0分中...)rn输入格式:rn占位rn输出格式:rn占位rn输入样例rn占位rn输出样例rn占位
大神 指导
rn rnrn[img=https://img-bbs.csdn.net/upload/201603/30/1459302126_60264.png][/img]rn[img=https://img-bbs.csdn.net/upload/201603/30/1459302174_955188.png][/img]rn 求<em>大神</em>知道哪里错了
大神指导,安卓!!!!
我标记的1,2,3处不理解,求<em>大神</em>可以解释下,谢谢^ω^![图片](https://img-ask.csdn.net/upload/201611/15/1479217669_412896.jpg)
求PS大神指导
怎么样使用图片上的人祛斑
大神指导,感激不尽。
我按书上给的源程序编译时却出现了错误。怎么了?下面是源代码:rn#include rnrnLRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;rnrnrnint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,rn PSTR szCmdLine, int iCmdShow)rnrn static TCHAR szAppName[] = TEXT ("HelloWin") ;rn HWND hwnd ;rn MSG msg ;rn WNDCLASS wndclass ;rnrn wndclass.style = CS_HREDRAW | CS_VREDRAW ;rn wndclass.lpfnWndProc = WndProc ;rn wndclass.cbClsExtra = 0 ;rn wndclass.cbWndExtra = 0 ;rn wndclass.hInstance = hInstance ;rn wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;rn wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;rn wndclass.hbrBackground= (HBRUSH) GetStockObject (WHITE_BRUSH) ;rn wndclass.lpszMenuName = NULL ;rn wndclass.lpszClassName= szAppName ;rnrn if (!RegisterClass (&wndclass))rn rn MessageBox ( NULL, TEXT ("This program requires Windows NT!"),rn szAppName, MB_ICONERROR) ;rn return 0 ;rn rnrn hwnd = CreateWindow( szAppName, // window class namern TEXT ("Full Screen Display"), // window captionrn// WS_OVERLAPPEDWINDOW, // window stylern WS_POPUP,rn// CW_USEDEFAULT,// initial x positionrn// CW_USEDEFAULT,// initial y positionrn// CW_USEDEFAULT,// initial x sizern// CW_USEDEFAULT,// initial y sizern 0,rn 0,rn ::GetSystemMetrics(SM_CXSCREEN),rn ::GetSystemMetrics(SM_CYSCREEN),rn NULL, // parent window handlern NULL, // window menu handlern hInstance, // program instance handlern NULL) ; // creation parametersrnrnrn ShowWindow (hwnd, iCmdShow) ;rn UpdateWindow (hwnd) ;rnrnrn while (GetMessage (&msg, NULL, 0, 0))rn rn TranslateMessage (&msg) ;rn DispatchMessage (&msg) ;rn rn return msg.wParam ;rnrnrnLRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)rnrn HDC hdc ;rn PAINTSTRUCT ps ;rn RECT rect ;rnrn switch (message)rn rn case WM_CREATE:rn// PlaySound (TEXT ("hellowin.wav"), NULL, SND_FILENAME | SND_ASYNC) ;rn return 0 ;rn case WM_PAINT:rn hdc = BeginPaint (hwnd, &ps) ;rn GetClientRect (hwnd, &rect) ;rn DrawText (hdc, TEXT ("This window can cover the task item!"), -1, &rect,rn DT_SINGLELINE | DT_CENTER | DT_VCENTER) ;rn EndPaint (hwnd, &ps) ;rn return 0 ;rn case WM_DESTROY:rn PostQuitMessage (0) ;rn return 0 ;rn rn return DefWindowProc (hwnd, message, wParam, lParam) ;rnrn错误:rnCompiling...rn01.crne:\programs\a\01.c(33) : warning C4003: not enough actual parameters for macro 'CreateWindowA'rne:\programs\a\01.c(33) : warning C4047: 'function' : 'int ' differs in levels of indirection from 'void *'rne:\programs\a\01.c(33) : warning C4024: 'CreateWindowExA' : different types for formal and actual parameter 8rne:\programs\a\01.c(33) : warning C4133: 'function' : incompatible types - from 'struct HINSTANCE__ *' to 'struct HMENU__ *'rne:\programs\a\01.c(33) : error C2059: syntax error : ')'rne:\programs\a\01.c(43) : error C2143: syntax error : missing '' before '__stdcall'rne:\programs\a\01.c(44) : warning C4142: benign redefinition of typerne:\programs\a\01.c(51) : warning C4129: 'm' : unrecognized character escape sequencerne:\programs\a\01.c(51) : warning C4129: '? : unrecognized character escape sequencern执行 cl.exe 时出错.rnrn01.obj - 1 error(s), 0 warning(s)rn求<em>大神</em><em>指导</em>
大神们求指导
为什么graphical layout 中没有文字编辑的控件[img=https://img-bbs.csdn.net/upload/201310/13/1381654097_97449.png][/img]
小弟求大神指导~
程序的逻辑中,经常会遇到,类似数据库操作。这些在c++中是怎么操作的呢?rnrn比如,一个对象拥有属性:姓,名,所在城市,身高,年龄,性别。rnrn要求列举中所有满足条件的对象:rn第一种情况rn 1.所在城市Arn 2.所有姓氏为李rn第二种情况,比较繁琐一点的:rn 1.身高为173~178之间的rn 2.性别为男rnrnrn项目中有不少诸如此类的问题。我基本是用了几个std::map或者std:multimap来做的,但是毕竟容易出错,而且操作起来复杂度也很高。rnrn高手达人,应该有什么多键<em>管理</em>器类的。rnrnrn[color=#FF0000]以上都是我打的比方,从项目中提炼出来的。我希望有良好的方法处理第一种情况。如果有代码就更好了。第二种貌似太麻烦了点,就不奢望了。小弟先在这里谢谢各位看帖的朋友了。O(∩_∩)O[/color]
新手求大神指导
[code=python]class SubMain():rn i=0rn while (i < 20):rn i = i + 1rn def __init__(self, submain):rn print self.irn self.submain = submainrn #self.url_360 = 'http://webscan.360.cn/sub/index/?url=%s' % self.submainrn self.url_aizhan= 'https://dns.aizhan.com/%s/%d/' % (self.submain,i)[/code]rn这种情况下,请问在def中怎么能调用到i变量
大神指导
需要用WPF做一个类似于PL/SQL的SQL语句编辑器,求资料,求<em>指导</em>!
求各位大神指导……
rn rn rn rnrn我把Winform的webbrowser控件添加到WPF中,但是无法用XAML对它定位,上面代码提示出错,我是手动添加上去的,请问应该怎样做才能对它实现精<em>确定</em>位,也就是说我想把它拉到哪就哪……rn
大神指导
这排序出来少一个数,初学者请<em>指导</em>。rnrnrnvar arr=[5,0,-56,900,12];rnrn for (var i=0;iarr[j+1])rn rn var temp=arr[j];rn arr[j]=arr[j+1];rn arr[j+1]=temp;rn rn rnrn rn for (var i=1;i
菜鸟求大神指导
想做一个串口驱动,有点糊涂了,记得mincicom和板子连接时要串口线,如果在配置内核时把已有的串口驱动的模块去掉,那么怎样加载自己写的驱动呢?
psapi.dll psapi.lib psapi.h下载
psapi.dll psapi.lib psapi.h 相关下载链接:[url=//download.csdn.net/download/bukouying/2310518?utm_source=bbsseo]//download.csdn.net/download/bukouying/2310518?utm_source=bbsseo[/url]
学习资料-微机原理与接口技术的下载
微机原理入门资料 第1章 微型计算机系统概述 第2章 8086/8088体系结构 第3章 8086/8088指令系统 第4章 汇编语言程序设计 第5章 输入输出接口技术 第6章 并行接口技术及并行接口芯片 第7章 串行接口技术及串行接口芯片 第8章 中断技术及中断控制器 第9章 定时/计数器 第10章 存储器技术 第11章 Pentium系列处理器的最新技术发展 相关下载链接:[url=//download.csdn.net/download/vdy2009/2511964?utm_source=bbsseo]//download.csdn.net/download/vdy2009/2511964?utm_source=bbsseo[/url]
利用动态规划解决01背包问题下载
利用动态规划算法实现了01背包问题,并取得了良好的效果。 相关下载链接:[url=//download.csdn.net/download/dazhangge/4876538?utm_source=bbsseo]//download.csdn.net/download/dazhangge/4876538?utm_source=bbsseo[/url]
相关热词 c# 线程顺序 c#昨天当前时间 c# 多进程 锁 c#mysql图片存取 c# ocx 委托事件 c# 读取类的属性和值 c# out 使用限制 c#获取url的id c#怎么进行分页查询 c# update 集合
我们是很有底线的