项目使用resin容器,发现resin容器启动时不加载listener,而需要在应用被首次访问时才会加载listener,完成bean的实例化,这样会导致服务重启后第一次的请求需要更长的时间来完成。
为什么?找啊找。网上的资料都说这个加载的顺序是。。。?? 我们的resin.conf的虚拟主机配置utf-8
修改成
发现这样的配置下resin容器启动时会加载listener了,当然启动的时间也相应的长了些! 关于host的配置: Defines a virtual host. If no hosts are specified, or if a request doesn't match a host, configuration in http-server will be used instead. The id may contain a list of hosts. Any host in the list will match. See application configuration for servlet configuration. Hosts can use regexp instead of id to dynamically create new hosts. 不确定原因?难道是动态主机的设置下resin不会加载listener,不能一对一的确定相应工程的配置文件? 有知道的牛们解释下哈^_^utf-8