- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我调试了 UserDetailsServiceImpl 的 loadUserByUsername 方法,但当我提交登录表单时,它永远不会被调用,我用谷歌搜索它,没有解决方案适合我。
登录.jsp
<form autocomplete="on" method="POST" id="loginForm"
action="j_spring_security_check">
<h1>Log in</h1>
<p>
<label for="email" class="uname" data-icon="u"> Email </label> <input
id="j_username" name="j_username" required="required"
type="text" placeholder="mymail@mail.com" />
</p>
<p>
<label for="password" class="youpasswd" data-icon="p">
Password </label> <input id="j_password" name="j_password"
required="required" type="password" placeholder="eg. X8df!90EO" />
</p>
<p class="keeplogin">
<input type="checkbox" name="loginkeeping" id="loginkeeping"
value="loginkeeping" /> <label for="loginkeeping">Keep
me logged in</label>
</p>
<p class="login button">
<input type="submit" value="Login" id="j_submitLogin" />
</p>
<p class="change_link">
Not register yet ? <a href="register.html" class="to_register">Register
now</a>
</p>
</form>
安全上下文.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<context:component-scan base-package="com.fyp.ptma" />
<beans:bean id="loggerListener"
class="org.springframework.security.authentication.event.LoggerListener" />
<global-method-security pre-post-annotations="enabled" />
<http pattern="/resources/**" security="none" />
<http use-expressions="true" auto-config="true">
<intercept-url pattern="/**" access="permitAll" />
<intercept-url pattern="/secure/*" access="isAuthenticated()" />
<form-login login-page="/login.html" default-target-url="/secure/fileUpload.html"
authentication-failure-url="/login.html?error=true"
login-processing-url="/j_spring_security_check"
authentication-success-handler-ref="loginSuccessHandler"
always-use-default-target="false" />
<logout />
<remember-me user-service-ref="userDetailsService" />
<access-denied-handler error-page="/login.html?error=true" />
</http>
<authentication-manager>
<authentication-provider user-service-ref="userDetailsService">
<password-encoder hash="md5" />
</authentication-provider>
</authentication-manager>
<beans:bean id="userDetailsService"
class="com.fyp.ptma.dao.service.UserDetailsServiceImpl">
</beans:bean>
<beans:bean id="loginSuccessHandler" class="com.fyp.ptma.security.LoginSuccessHandler" />
</beans:beans>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/log4j.properties</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/root-context.xml
/WEB-INF/spring/appServlet/security-context.xml
/WEB-INF/hibernate/hibernate-config.xml
</param-value>
</context-param>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Processes application requests -->
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>120</session-timeout>
</session-config>
</web-app>
Spring 安全日志
20:32:57,569 DEBUG [org.springframework.security.web.util.AntPathRequestMatcher] - Checking match of request : '/'; against '/resources/**'
20:32:57,570 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 1 of 11 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
20:32:57,571 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - No HttpSession currently exists
20:32:57,571 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - No SecurityContext was available from the HttpSession: null. A new one will be created.
20:32:57,573 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 2 of 11 in additional filter chain; firing Filter: 'LogoutFilter'
20:32:57,573 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 3 of 11 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
20:32:57,573 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 4 of 11 in additional filter chain; firing Filter: 'BasicAuthenticationFilter'
20:32:57,573 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 5 of 11 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
20:32:57,573 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 6 of 11 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
20:32:57,574 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 7 of 11 in additional filter chain; firing Filter: 'RememberMeAuthenticationFilter'
20:32:57,574 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 8 of 11 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
20:32:57,575 DEBUG [org.springframework.security.web.authentication.AnonymousAuthenticationFilter] - Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@6faaf9b0: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@ffff8868: RemoteIpAddress: 0:0:0:0:0:0:0:1%0; SessionId: null; Granted Authorities: ROLE_ANONYMOUS'
20:32:57,575 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 9 of 11 in additional filter chain; firing Filter: 'SessionManagementFilter'
20:32:57,575 DEBUG [org.springframework.security.web.session.SessionManagementFilter] - Requested session ID 1x8wca5l9e1m31npsvhg4wkyv7 is invalid.
20:32:57,575 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 10 of 11 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
20:32:57,575 DEBUG [org.springframework.security.web.FilterChainProxy] - / at position 11 of 11 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
20:32:57,576 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Secure object: FilterInvocation: URL: /; Attributes: [permitAll]
20:32:57,576 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken@6faaf9b0: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@ffff8868: RemoteIpAddress: 0:0:0:0:0:0:0:1%0; SessionId: null; Granted Authorities: ROLE_ANONYMOUS
20:32:57,576 DEBUG [org.springframework.security.access.vote.AffirmativeBased] - Voter: org.springframework.security.web.access.expression.WebExpressionVoter@3a34c0bd, returned: 1
20:32:57,576 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Authorization successful
20:32:57,576 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - RunAsManager did not change Authentication object
20:32:57,577 DEBUG [org.springframework.security.web.FilterChainProxy] - / reached end of additional filter chain; proceeding with original chain
20:32:58,040 DEBUG [org.springframework.security.web.access.ExceptionTranslationFilter] - Chain processed normally
20:32:58,041 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
20:32:58,041 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] - SecurityContextHolder now cleared, as request processing completed
20:33:03,194 DEBUG [org.springframework.security.web.util.AntPathRequestMatcher] - Checking match of request : '/login.html'; against '/resources/**'
20:33:03,195 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 1 of 11 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
20:33:03,196 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - No HttpSession currently exists
20:33:03,196 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - No SecurityContext was available from the HttpSession: null. A new one will be created.
20:33:03,196 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 2 of 11 in additional filter chain; firing Filter: 'LogoutFilter'
20:33:03,196 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 3 of 11 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
20:33:03,196 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 4 of 11 in additional filter chain; firing Filter: 'BasicAuthenticationFilter'
20:33:03,196 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 5 of 11 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
20:33:03,196 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 6 of 11 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
20:33:03,196 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 7 of 11 in additional filter chain; firing Filter: 'RememberMeAuthenticationFilter'
20:33:03,197 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 8 of 11 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
20:33:03,197 DEBUG [org.springframework.security.web.authentication.AnonymousAuthenticationFilter] - Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@6faaf9b0: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@ffff8868: RemoteIpAddress: 0:0:0:0:0:0:0:1%0; SessionId: null; Granted Authorities: ROLE_ANONYMOUS'
20:33:03,197 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 9 of 11 in additional filter chain; firing Filter: 'SessionManagementFilter'
20:33:03,197 DEBUG [org.springframework.security.web.session.SessionManagementFilter] - Requested session ID 1x8wca5l9e1m31npsvhg4wkyv7 is invalid.
20:33:03,199 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 10 of 11 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
20:33:03,199 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html at position 11 of 11 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
20:33:03,199 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Secure object: FilterInvocation: URL: /login.html; Attributes: [permitAll]
20:33:03,199 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken@6faaf9b0: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@ffff8868: RemoteIpAddress: 0:0:0:0:0:0:0:1%0; SessionId: null; Granted Authorities: ROLE_ANONYMOUS
20:33:03,199 DEBUG [org.springframework.security.access.vote.AffirmativeBased] - Voter: org.springframework.security.web.access.expression.WebExpressionVoter@3a34c0bd, returned: 1
20:33:03,199 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Authorization successful
20:33:03,200 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - RunAsManager did not change Authentication object
20:33:03,200 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html reached end of additional filter chain; proceeding with original chain
20:33:03,225 DEBUG [org.springframework.security.web.access.ExceptionTranslationFilter] - Chain processed normally
20:33:03,226 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
20:33:03,226 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] - SecurityContextHolder now cleared, as request processing completed
20:33:07,738 DEBUG [org.springframework.security.web.util.AntPathRequestMatcher] - Checking match of request : '/j_spring_security_check'; against '/resources/**'
20:33:07,739 DEBUG [org.springframework.security.web.FilterChainProxy] - /j_spring_security_check at position 1 of 11 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
20:33:07,739 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - No HttpSession currently exists
20:33:07,739 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - No SecurityContext was available from the HttpSession: null. A new one will be created.
20:33:07,739 DEBUG [org.springframework.security.web.FilterChainProxy] - /j_spring_security_check at position 2 of 11 in additional filter chain; firing Filter: 'LogoutFilter'
20:33:07,739 DEBUG [org.springframework.security.web.FilterChainProxy] - /j_spring_security_check at position 3 of 11 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
20:33:07,739 DEBUG [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter] - Request is to process authentication
20:33:07,744 DEBUG [org.springframework.security.authentication.ProviderManager] - Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider
20:33:07,968 WARN [org.springframework.security.authentication.event.LoggerListener] - Authentication event AuthenticationFailureServiceExceptionEvent: asdfasdfaasdf; details: org.springframework.security.web.authentication.WebAuthenticationDetails@ffff8868: RemoteIpAddress: 0:0:0:0:0:0:0:1%0; SessionId: null; exception: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Could not open connection
20:33:07,968 DEBUG [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter] - Authentication request failed: org.springframework.security.authentication.AuthenticationServiceException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Could not open connection
20:33:07,968 DEBUG [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter] - Updated SecurityContextHolder to contain null Authentication
20:33:07,968 DEBUG [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter] - Delegating to authentication failure handlerorg.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler@2aca6d70
20:33:07,968 DEBUG [org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices] - Interactive login attempt was unsuccessful.
20:33:07,968 DEBUG [org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices] - Cancelling cookie
20:33:07,973 DEBUG [org.springframework.security.web.session.HttpSessionEventPublisher] - Publishing event: org.springframework.security.web.session.HttpSessionCreatedEvent[source=org.mortbay.jetty.servlet.HashSessionManager$Session:qvnxffio0znw@693465617]
20:33:07,974 DEBUG [org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler] - Redirecting to /login.html?error=true
20:33:07,976 DEBUG [org.springframework.security.web.DefaultRedirectStrategy] - Redirecting to '/ptma/login.html?error=true'
20:33:07,976 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
20:33:07,977 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] - SecurityContextHolder now cleared, as request processing completed
20:33:07,988 DEBUG [org.springframework.security.web.util.AntPathRequestMatcher] - Checking match of request : '/login.html'; against '/resources/**'
20:33:07,988 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 1 of 11 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
20:33:07,988 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - HttpSession returned null object for SPRING_SECURITY_CONTEXT
20:33:07,988 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - No SecurityContext was available from the HttpSession: org.mortbay.jetty.servlet.HashSessionManager$Session:qvnxffio0znw@693465617. A new one will be created.
20:33:07,988 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 2 of 11 in additional filter chain; firing Filter: 'LogoutFilter'
20:33:07,988 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 3 of 11 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
20:33:07,988 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 4 of 11 in additional filter chain; firing Filter: 'BasicAuthenticationFilter'
20:33:07,989 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 5 of 11 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
20:33:07,989 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 6 of 11 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
20:33:07,989 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 7 of 11 in additional filter chain; firing Filter: 'RememberMeAuthenticationFilter'
20:33:07,989 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 8 of 11 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
20:33:07,989 DEBUG [org.springframework.security.web.authentication.AnonymousAuthenticationFilter] - Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@90541710: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@166c8: RemoteIpAddress: 0:0:0:0:0:0:0:1%0; SessionId: qvnxffio0znw; Granted Authorities: ROLE_ANONYMOUS'
20:33:07,989 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 9 of 11 in additional filter chain; firing Filter: 'SessionManagementFilter'
20:33:07,989 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 10 of 11 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
20:33:07,989 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true at position 11 of 11 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
20:33:07,989 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Secure object: FilterInvocation: URL: /login.html?error=true; Attributes: [permitAll]
20:33:07,989 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken@90541710: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@166c8: RemoteIpAddress: 0:0:0:0:0:0:0:1%0; SessionId: qvnxffio0znw; Granted Authorities: ROLE_ANONYMOUS
20:33:07,989 DEBUG [org.springframework.security.access.vote.AffirmativeBased] - Voter: org.springframework.security.web.access.expression.WebExpressionVoter@3a34c0bd, returned: 1
20:33:07,989 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Authorization successful
20:33:07,989 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - RunAsManager did not change Authentication object
20:33:07,989 DEBUG [org.springframework.security.web.FilterChainProxy] - /login.html?error=true reached end of additional filter chain; proceeding with original chain
20:33:07,992 DEBUG [org.springframework.security.web.access.ExceptionTranslationFilter] - Chain processed normally
20:33:07,992 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
20:33:07,992 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] - SecurityContextHolder now cleared, as request processing completed
最佳答案
您的日志讲述了不同的故事 - 调用了 UserDetailsService
但引发了异常:
20:33:07,744 DEBUG [org.springframework.security.authentication.ProviderManager] - Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider
20:33:07,968 WARN [org.springframework.security.authentication.event.LoggerListener] - Authentication event AuthenticationFailureServiceExceptionEvent: asdfasdfaasdf; details: org.springframework.security.web.authentication.WebAuthenticationDetails@ffff8868: RemoteIpAddress: 0:0:0:0:0:0:0:1%0; SessionId: null; exception: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Could not open connection
JDBC URL/凭据不正确?数据库未运行?
关于java - UserDetailsService 的 loadUserByUsername 方法从未被调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17195484/
我想了解 Ruby 方法 methods() 是如何工作的。 我尝试使用“ruby 方法”在 Google 上搜索,但这不是我需要的。 我也看过 ruby-doc.org,但我没有找到这种方法。
Test 方法 对指定的字符串执行一个正则表达式搜索,并返回一个 Boolean 值指示是否找到匹配的模式。 object.Test(string) 参数 object 必选项。总是一个
Replace 方法 替换在正则表达式查找中找到的文本。 object.Replace(string1, string2) 参数 object 必选项。总是一个 RegExp 对象的名称。
Raise 方法 生成运行时错误 object.Raise(number, source, description, helpfile, helpcontext) 参数 object 应为
Execute 方法 对指定的字符串执行正则表达式搜索。 object.Execute(string) 参数 object 必选项。总是一个 RegExp 对象的名称。 string
Clear 方法 清除 Err 对象的所有属性设置。 object.Clear object 应为 Err 对象的名称。 说明 在错误处理后,使用 Clear 显式地清除 Err 对象。此
CopyFile 方法 将一个或多个文件从某位置复制到另一位置。 object.CopyFile source, destination[, overwrite] 参数 object 必选
Copy 方法 将指定的文件或文件夹从某位置复制到另一位置。 object.Copy destination[, overwrite] 参数 object 必选项。应为 File 或 F
Close 方法 关闭打开的 TextStream 文件。 object.Close object 应为 TextStream 对象的名称。 说明 下面例子举例说明如何使用 Close 方
BuildPath 方法 向现有路径后添加名称。 object.BuildPath(path, name) 参数 object 必选项。应为 FileSystemObject 对象的名称
GetFolder 方法 返回与指定的路径中某文件夹相应的 Folder 对象。 object.GetFolder(folderspec) 参数 object 必选项。应为 FileSy
GetFileName 方法 返回指定路径(不是指定驱动器路径部分)的最后一个文件或文件夹。 object.GetFileName(pathspec) 参数 object 必选项。应为
GetFile 方法 返回与指定路径中某文件相应的 File 对象。 object.GetFile(filespec) 参数 object 必选项。应为 FileSystemObject
GetExtensionName 方法 返回字符串,该字符串包含路径最后一个组成部分的扩展名。 object.GetExtensionName(path) 参数 object 必选项。应
GetDriveName 方法 返回包含指定路径中驱动器名的字符串。 object.GetDriveName(path) 参数 object 必选项。应为 FileSystemObjec
GetDrive 方法 返回与指定的路径中驱动器相对应的 Drive 对象。 object.GetDrive drivespec 参数 object 必选项。应为 FileSystemO
GetBaseName 方法 返回字符串,其中包含文件的基本名 (不带扩展名), 或者提供的路径说明中的文件夹。 object.GetBaseName(path) 参数 object 必
GetAbsolutePathName 方法 从提供的指定路径中返回完整且含义明确的路径。 object.GetAbsolutePathName(pathspec) 参数 object
FolderExists 方法 如果指定的文件夹存在,则返回 True;否则返回 False。 object.FolderExists(folderspec) 参数 object 必选项
FileExists 方法 如果指定的文件存在返回 True;否则返回 False。 object.FileExists(filespec) 参数 object 必选项。应为 FileS
我是一名优秀的程序员,十分优秀!