STS (eclipse) run on server with Tomcat hangs at "Initializing Spring root WebApplicationContext"

来源:互联网 发布:网页怎么调用php 编辑:程序博客网 时间:2024/05/16 08:02

症状

用STS 调试一个Spring 框架的项目时,运行它(run on server),这时STS 的console 打印出一些运行信息,最后打印的信息是

Initializing Spring root WebApplicationContext


然后停住了。稍后,报Server 未在规定时间内启动的错误。

调查


经过一番搜索,了解到应该让Spring 多打印一些信息才能知道具体出了什么错误于是加上


<logger name="org.springframework"><level value="debug" />             <appender-ref ref="console" /></logger>

结果

通过Spring 框架的log 信息,终于发现是数据库的配置文件错误。导致无法连到数据库的错误。


过程中也遇到sts 不能正常的将工程目标文件部署到wtpserver 目录下的问题。通过google 搜索找相应的查看方法。

STS 突然不能正常部署的问题挺让人头痛。



原创粉丝点击