如果您有许多不同的组件(身份验证、授权、本地化、支付等)而且每个组件可能需要或可能不需要在请求的整个生命周期内访问数据库(除了支付之外,这些请求的生存期相当短),这样做更好吗?of the **request** and pass that around
3. open a new connection every time I need something, maybe 2-
我运行一个带有特定参数的jar,例如:testscript run,然后这个testscript存在于不同的目录中,所以我使用ant的java命令运行该脚本的jar,如下所示:<arg value="run"/>通过这样做,我得到了错误Could not find or load main class。这个命令对于前2-3个实例