- 浏览: 8952 次
- 性别:
- 来自: 上海
-
最新评论
文章列表
有这样一个需求,在使用maven部署项目时,项目中properties文件的某些变量需要根据不同的环境(测试,线上)设置不同的值。
1. property文件
resources.static.host=${resources.static.host}
2. pom文件
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
*** p ...
http://blog.developwithpassion.com/2012/03/30/installing-rvm-with-cygwin-on-windows/
https://github.com/developwithpassion/devtools
当URL中带中文参数时,action中获得的参数显示为乱码,插入数据库仍为乱码(数据库UTF-8存储),后修改了Tomcat的配置文件server.xml 中的 <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8" />, 添加 URIEncoding="UTF-8" 即可
程序中常会用到final来定义一些常量,例如 public static final String A = "A", 在编译过程中,引用到变量A的地方将会使用“A”来替换变量,当我们需要修改变量A的值时,例如 public static final String A = "B", 就需要重新编译引用到A变量的程序,否则引用到A变量的地方将仍然保持"A"值,而不会是“B”.
有的时候可能有这种需求,需要定义一个final的变量,但可能需要在某些时候修改变量的值又不想对引用到变量的程序重新编译,于是使用一个static方法,例如
...
在使用Apache Http Server作为文件服务器的时候,发现对于MS office 2007的文档不能正常的下载,总是会将原文件保存为.zip文件。网上搜索了一下,2007 Microsoft Office 系统通过在 Microsoft Office Excel 2007、Microsoft Office Word 2007 和 Microsoft Office PowerPoint 2007 中采用基于 XML 的文件格式进行转换,新的文件格式称为 Microsoft Office Open XML 格式。
解决方法:
修改Apache配置文件httpd.conf,添加 AddTyp ...
2010-3-16 16:24:50 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'keystor
eFile' to 'conf/tomcat.keystore' did not find a matching property.
2010-3-16 16:24:50 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [Se ...