liu_g927
liu_g927 · 共 27 篇文章
nginx502超时错误
问题:一个复杂逻辑的请求,请求处理时间较长,做了session共享,session会丢失(报ngnix502 bad gateway) 问题。 解决:location节点增加相关参数 **proxy_connect_timeout 300; #**默认60秒 **proxy_send_timeout 300; #**默认60秒 **proxy_read_timeout 300; #**默认60秒 官网配置例子: http://wiki.nginx.org/ChsFullExample2
2012-09-03 22:28 · nginx · 评论(0)
Linux Command: source
NAME source - Evaluate a file or resource as a Tcl script SYNOPSIS source fileName source -rsrc resourceName ? fileName ? source -rsrcid resourceId ? fileName ? DESCRIPTION This command takes the contents of the specified file or resource and passes it to the Tcl interpreter as a text script. The r…
2012-08-25 22:22 · linux · 评论(0)
转:Shallow and retained sizes
Shallow and retained sizes YourKit Java Profiler is capable of measuring shallow and retained sizes of objects. Shallow size of an object is the amount of memory allocated to store the object itself, not taking into account the referenced objects. Shallow size of a regular (non-array) object depend…
2012-08-06 18:42 · 基础 · 评论(0)
spring mvc redirect
public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter implements BeanFactoryAware, InitializingBean { ..... protected final ModelAndView handleInternal(HttpServletRequest request, HttpServletResponse response, HandlerMethod handlerMethod) throws Exception { if (getSessionAt…
2012-07-30 23:10 · 随手记 · 评论(0)
spring 多工程加载多属性集配置问题
<bean id="propertyConfigurerJdbc" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="order" value="1" /> <property name="ignoreUnresolvablePlaceholders" value="true" /> <property name="locations"> <list> <value>classpath:config/jdbc.properties</value> </…
2012-07-23 14:54 · 随手记 · 评论(0)
struts2配置文件路径
请求时报以下异常: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.ObjectFactory, name='default'] in public void com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.setObjectFactory(com.opensymphony.xwork2.O…
2012-07-12 18:57 · 随手记 · 评论(0)
spring web配置
比较诡异的一个问题,最近将项目移植到maven上管理,打包后发布到服务器上竟然报业务类没有定义: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xxx' is defined 在移植之前一切正常,移植后只是将依赖交由maven来管理,配置文件什么的都没有内容上的变更。最后找出的原因很狗血。 将原来配置: <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:app…
2012-07-10 18:13 · 随手记 · 评论(0)
执行mvn 命令出现的duplicated in the reactor问题
maven组合项目中,运行mvn clean,报以下错误: [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Project 'xx' is duplicated in the reactor 原因是父po…
2012-07-10 18:00 · maven · 评论(0)
VM虚拟机Bridge模式VMnet0网卡无法启动问题
之前通过qq管家优化了系统服务之后,VM怎么也连不上网络,后来把相关关闭的服务都开启,还是无法联网。无意中在VM的message log中看到这个日志: The network bridge on device VMnet0 is temporarily down because the bridged Ethernet interface is down 在VMWARE的Virtual Network Editor发现VMnet0设置中Bridge to默认联接的是笔记本有线网卡,设为Automatic即可。(我以桥接方式联网)
2012-07-05 23:08 · 随手记 · 评论(0)
原:hibernate延迟加载延伸的一个问题
hibernate配置延迟加载报:failed to lazily initialize a collection of role: com.ln.jtf.biz.dal.dao.pojos.Customer.cusaccounts, no session or session was closed。原因是web上get子表时session已经关闭。针对这个问题spring提供了解决方案,有两种方式: 一种是过滤器:OpenSessionInViewFilter,在web.xml文件中增加配置如下: <filter> <filter-name>hibernateFilter</filter-…
2012-06-30 14:31 · 随手记 · 评论(0)
oracle:rank
Term: RANK Definition: In Oracle PL/SQL, RANK function is a built in analytic function which is used to rank a record within a group of rows. Its return type is number and serves for both aggregate and analytic purpose in SQL. Example Syntax: Used as an Aggregate function: RANK (expression) WITHIN …
2012-06-26 13:27 · 随手记 · 评论(0)
freemarker中文乱码
<!-- 设置 ViewResolver --> <bean id="freemarkerConfiguration" class="org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean"> <property name="templateLoaderPath" value="file://${ln.jtf.template.templatePath}" /> <property name="freemarkerSettings"> <props> <prop key="default_encoding">U…
2012-06-23 22:05 · 随手记 · 评论(0)
nginx内置变量
$args, 请求中的参数; $content_length, HTTP请求信息里的"Content-Length"; $content_type, 请求信息里的"Content-Type"; $document_root, 针对当前请求的根路径设置值; $document_uri, 与$uri相同; $host, 请求信息中的"Host",如果请求中没有Host行,则等于设置的服务器名; $limit_rate, 对连接速率的限制; $request_method, 请求的方法,比如"GET"、"POST"等; $remote_addr, 客户端地址; $remote_port, 客户端端…
2012-06-19 18:24 · nginx · 评论(0)
转:Nginx使用Linux内存加速静态文件访问
转自: http://blog.prosight.me/index.php/2012/02/889 Nginx是一个非常出色的静态资源web服务器。如果你嫌它还不够快,可以把放在磁盘中的文件,映射到内存中,减少高并发下的磁盘IO。 先做几个假设。nginx.conf中所配置站点的路径是/home/wwwroot/res,站点所对应文件原始存储路径:/opt/web/res shell脚本非常简单,思路就是拷贝资源文件到内存中,然后在把网站的静态文件链接指向到内存中即可。具体如下: #! /bin/bash res_path="/opt/web/res" mem_path="/dev/shm/…
2012-06-19 17:52 · nginx · 评论(0)