Rory's Blog
Happy study,Happy work,Happy life
posts - 22,  comments - 46,  trackbacks - 0

我的评论

哦。是么?赶紧下载一个新版试试。
以前都没有注意。
今天才注意到servlet的doc里面有写过。
public void setCharacterEncoding(java.lang.String env)
throws java.io.UnsupportedEncodingExceptionOverrides the name of the character encoding used in the body of this request. This method must be called prior to reading request parameters or reading input using getReader().
Parameters:
a - String containing the name of the chararacter encoding.
Throws:
java.io.UnsupportedEncodingException - if this is not a valid encoding
re: 关于spring启动的优化的问题 莫多 2006-08-11 20:58  
是么。不过我好像是可以的啊。
除了。scheduler我好都设置的lazy-init
re: 还是乱码问题 莫多 2006-07-25 19:45  
oc4j没有用过。不过是不是也有地方可以配置的啊。
是啊。都是这个问题,不过Robbin给出了最终解决方法。呵呵。
http://www.javaeye.com/display/opensourceframework/HibernateUtils
可以看看。
我都用UUID,可是没有你说的这个问题。
不会有问题的,还有就是你用Hiberate3那么就用uuid
你看源代码就知道uuid.hex其实和uuid是一样的了。只有在hibernate2里面才有区别。
这个就是因为Hibernate的条件查询的时候你可以addOrder()添加很多排序的方式。如果你在addOrder之后取totalcount那样Hibernate也会把order by语句拼接到你的select count(*)语句后面。然而有的数据库是不支持的。eg(SqlServer)所以就会出错了。请看我的最新文章。
re: 用ant进行项目无忧部署 莫多 2006-04-29 11:59  
哦是么?没有用过。原意赐教。
re: openfans快速配置指南 莫多 2006-04-11 17:50  
然后按照上面说的。运行mvn -Declipse.downloadSources=true eclipse:eclipse
又抱错误找不到。
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [eclipse:eclipse]
[WARNING] This plugin currently doesn't support include patterns for resources.
Adding the entire directory.
[WARNING] This plugin currently doesn't support include patterns for resources.
Adding the entire directory.
Downloading: http://www.ibiblio.org/maven2/org/springframework/spring-mock/1.2.6">http://www.ibiblio.org/maven2/org/springframework/spring-mock/1.2.6
/spring-mock-1.2.6-sources.jar
[WARNING] Unable to get resource from repository central (http://www.ibiblio.org
/maven2)
Downloading: http://www.openfans.org:81/maven2/org/springframework/spring-mock/1">http://www.openfans.org:81/maven2/org/springframework/spring-mock/1
.2.6/spring-mock-1.2.6-sources.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Error transferring file
org.springframework:spring-mock:java-source:1.2.6

from the specified remote repositories:
central (http://www.ibiblio.org/maven2),
openfans (http://www.openfans.org:81/maven2)


Caused by I/O exception: Connection refused: connect

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Tue Apr 11 17:45:56 GMT+08:00 2006
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------
re: openfans快速配置指南 莫多 2006-04-11 17:49  
mvn eclipse:eclipse就不能通过。
D:\Project\openfans>mvn eclipse:eclipse
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'eclipse'.
[INFO] -------------------------------------------------------------------------
---
[INFO] Building openfans
[INFO] task-segment: [eclipse:eclipse]
[INFO] -------------------------------------------------------------------------
---
[INFO] Preparing eclipse:eclipse
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[WARNING]
Artifact javax.servlet:jstl:jar:1.1.2:runtime retains local scope 'runti
me' overriding broader scope 'compile'
given by a dependency. If this is not intended, modify or remove the loc
al scope.

[WARNING]
Artifact jdom:jdom:jar:1.0:runtime retains local scope 'runtime' overrid
ing broader scope 'compile'
given by a dependency. If this is not intended, modify or remove the loc
al scope.

[WARNING]
Artifact taglibs:standard:jar:1.1.2:runtime retains local scope 'runtime
' overriding broader scope 'compile'
given by a dependency. If this is not intended, modify or remove the loc
al scope.

[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [eclipse:eclipse]
[WARNING] This plugin currently doesn't support include patterns for resources.
Adding the entire directory.
[WARNING] This plugin currently doesn't support include patterns for resources.
Adding the entire directory.
[INFO] Not writing settings - defaults suffice
[INFO]
Sources for some artifacts are not available.
Please run "mvn -Declipse.downloadSources=true eclipse:eclipse" in order
to check remote repositories for sources.
List of artifacts without a source archive:
o org.springframework:spring-mock:jar:1.2.6
o junit:junit:jar:3.8.1
o commons-logging:commons-logging:jar:1.0.4
o javax.servlet:servlet-api:jar:2.4
o commons-digester:commons-digester:jar:1.5
o geronimo-spec:geronimo-spec-jta:jar:1.0.1B-rc4
o uk.ltd.getahead:dwr:jar:1.0
o org.springframework:spring:jar:1.2.6
o opensymphony:sitemesh:jar:2.2.1
o com.lowagie:itext:jar:0.99
o commons-validator:commons-validator:jar:1.1.3
o javax.servlet:jstl:jar:1.1.2
o asm:asm:jar:1.5.3
o commons-dbcp:commons-dbcp:jar:1.2.1
o jdom:jdom:jar:1.0
o taglibs:standard:jar:1.1.2
o oro:oro:jar:2.0.8
o antlr:antlr:jar:2.7.6rc1
o commons-beanutils:commons-beanutils:jar:1.6.1
o commons-io:commons-io:jar:1.1
o org.tuckey:urlrewrite:jar:2.5.2
o xerces:xercesImpl:jar:2.0.2
o p6spy:p6spy:jar:1.3
o rome:rome:jar:0.8
o commons-fileupload:commons-fileupload:jar:1.1
o mysql:mysql-connector-java:jar:3.1.11
o org.hibernate:hibernate:jar:3.1
o displaytag:displaytag:jar:1.0
o dom4j:dom4j:jar:1.6
o cglib:cglib:jar:2.1_3
o ehcache:ehcache:jar:1.1
o commons-lang:commons-lang:jar:2.0
o commons-collections:commons-collections:jar:2.1.1
o springmodules:springmodules-validator:jar:0.1
o log4j:log4j:jar:1.2.11
o xml-apis:xml-apis:jar:1.0.b2
o commons-pool:commons-pool:jar:1.2

[INFO] Wrote Eclipse project for "openfans" to D:\Project\openfans.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Tue Apr 11 17:43:11 GMT+08:00 2006
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------
re: spring操作数据库如此简单 莫多 2006-04-07 10:56  
to:剑事
我是为了用hibernate才这样做的啊,这样我就不用再写insert了啊。呵呵。
re: spring操作数据库如此简单 莫多 2006-04-07 10:55  
To:yerba
怎么没有作用?
cateManager.saveCategory(cate);
用这个保存到我的新数据库中的啊。
re: spring操作数据库如此简单 莫多 2006-04-07 09:13  
为什么不要了? 不明白
@anonymous
也许很多人都认为这种是最好的方式,以前我也使这么认为的。可是现在我不这么认为。
因为我们的webapp每天都要发布。而上传的那个文件夹有好几个G。这个问题就是发布的时候要去把那个目录的东西都cut出来。然后再发布,发布完再把那个upload目录放回去。而我们这样做就是为了方便。把upload的files放到其地方去。这样每天晚上12点去部署那个app就可以了。
呵呵。我就是想实现这个的。今天我基本上实现了。用spring去注入的。
re: spring培训-笔记 莫多 2006-03-01 10:44  
<bean
id="beanId"(1)
name="beanName"(2)
class="beanClass"(3)
parent="parentBean"(4)
abstract="true | false"(5)
singleton="true | false"(6)
lazy-init="true | false | default"(7)
autowire="no | byName | byType | constructor | autodetect | default"(8)
dependency-check = "none | objects | simple | all | default"(9)
depends-on="dependsOnBean"(10)
init-method="method"(11)
destroy-method="method"(12)
factory-method="method"(13)
factory-bean="bean">(14)
</bean>

(7)、lazy-init(默认为“default”):用来定义这个Bean是否实现懒初始化。如果为“true”,它将在BeanFactory启动时初始化所有的Singleton Bean。反之,如果为“false”,它只在Bean请求时才开始创建Singleton Bean。

是不是写反了?

<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(1)

随笔分类(27)

随笔档案(22)

Friends

搜索

  •  

积分与排名

  • 积分 - 61421
  • 排名 - 847

最新评论

阅读排行榜

评论排行榜