for循环应该使用StringBuffer类,性能会比String高。代码如下
String temp=sid.substring(1);
int i=Integer.parseInt(temp);
i++;
temp=String.valueOf(i);
StringBuffer buf=new StringBuffer();
buf.append("S");
int len=temp.length();
//凑够七位
for(int j=0;j<7-len;j++){
buf.append("0");
}
sid=buf.append(temp).toString();
String temp=sid.substring(1);
int i=Integer.parseInt(temp);
i++;
temp=String.valueOf(i);
StringBuffer buf=new StringBuffer();
buf.append("S");
int len=temp.length();
//凑够七位
for(int j=0;j<7-len;j++){
buf.append("0");
}
sid=buf.append(temp).toString();
2016-04-06
Session session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession();
这一句的时候报错:Type mismatch: cannot convert from org.hibernate.Session to javax.jms.Session
求解答!卡了好久了
这一句的时候报错:Type mismatch: cannot convert from org.hibernate.Session to javax.jms.Session
求解答!卡了好久了
2016-04-06
Session session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession();
这一句的时候报错:Type mismatch: cannot convert from org.hibernate.Session to javax.jms.Session
这一句的时候报错:Type mismatch: cannot convert from org.hibernate.Session to javax.jms.Session
2016-04-06
创建session的时候出问题了:Type mismatch: cannot convert from org.hibernate.Session to javax.jms.Session
我老师导入的jar包是一样的,为什么会这样呢求解答!
我老师导入的jar包是一样的,为什么会这样呢求解答!
2016-04-06
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
为毛会出现和日志有关的错误
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
为毛会出现和日志有关的错误
4分05秒中,modify.action后面加个问号然后协商sid的属性,这样就可以传参数到action中?什么个原理啊?
2016-03-25