准備學習下Spring Security 4,整合spring mvc時正常,加入spring security包後也下常,但是把Spring Security配置文件加入到web.xml啟動配置後就有問題了。
spring-4.1.6.RELEASE
spring-security-4.0.1.RELEASE
tomcat-7.0.28
Ideal 14
整個啟動過程如以下及1,2樓回復所示,啟動到初始化bean之後就不動了。也不報錯,不知道這是什麼情況造成的
啟動日志:
D:\programs\container\tomcat-7.0.28-eclipse\bin\catalina.bat run
[2015-04-30 10:58:34,456] Artifact security-war:war exploded: Server is not connected. Deploy is not available.
Using CATALINA_BASE: "C:\Users\Administrator\.IntelliJIdea14\system\tomcat\Unnamed_study-spsecurity_2"
Using CATALINA_HOME: "D:\programs\container\tomcat-7.0.28-eclipse"
Using CATALINA_TMPDIR: "D:\programs\container\tomcat-7.0.28-eclipse\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.7.0_71"
Using CLASSPATH: "D:\programs\container\tomcat-7.0.28-eclipse\bin\bootstrap.jar;D:\programs\container\tomcat-7.0.28-eclipse\bin\tomcat-juli.jar"
四月 30, 2015 10:58:35 下午 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.24 using APR version 1.4.6.
四月 30, 2015 10:58:35 下午 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
四月 30, 2015 10:58:36 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.0.1c 10 May 2012)
四月 30, 2015 10:58:36 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8080"]
四月 30, 2015 10:58:36 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8009"]
四月 30, 2015 10:58:36 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1466 ms
四月 30, 2015 10:58:36 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
四月 30, 2015 10:58:36 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.28
四月 30, 2015 10:58:36 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8080"]
四月 30, 2015 10:58:36 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
四月 30, 2015 10:58:36 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 59 ms
[2015-04-30 10:58:37,115] Artifact security-war:war exploded: Artifact is being deployed, please wait...
Connected to server
最後還是我來結貼吧,,這個奇怪的問題居然是因為我使用了spring security中新加密類org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder,這個加密類在我本機上執行時間越長,才導致了初始化、登錄時的延遲