博文

目前显示的是标签为“spring”的博文

Spring resource

1.http://repo.spring.io/milestone/org/springframework/ 2.http://repo.springsource.org/libs-release-local/org/springframework/spring/ http://repo.springsource.org/libs-release-local/org/springframework/spring/4.2.6.RELEASE/ 3.https://github.com/spring-projects/spring-framework

Spring Password Encoding

Password Encoding A hash in with the spring-security-core jar           String s = "test";           org.springframework.security.authentication.encoding.Md5PasswordEncoder md5e =             new org.springframework.security.authentication.encoding.Md5PasswordEncoder();         System.out.println("md5e.encodePassword(s, null):" +                            md5e.encodePassword(s, null)); A hash with Salt added  The StandardPasswordEncoder in the crypto package uses a random 8-byte salt, which is stored in the same field as the password.          org.springframework.security.crypto.password.StandardPasswordEncoder S...

getAuthentication() when error-page 404 is shown in the Spring.

in web.xml.   < error-page >        < error-code > 404 </ error-code >       < location > /WEB-INF/pages/errors/error404.jsp </ location >      </ error-page >  In error404.jsp, don't get user message by using SecurityContextHolder.getContext().getAuthentication(). Solution: <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>          <...