├── chapter03
├── kaptcha
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── index.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── formlogin
│ │ │ ├── FormloginApplication.java
│ │ │ ├── controller
│ │ │ └── MyLoginController.java
│ │ │ └── config
│ │ │ └── KaptchaConfig.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── formlogin
│ │ └── FormloginApplicationTests.java
├── multiuser
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── index.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── formlogin
│ │ │ ├── FormloginApplication.java
│ │ │ ├── controller
│ │ │ └── MyLoginController.java
│ │ │ └── config
│ │ │ ├── MyAuthenticationSuccessHandler.java
│ │ │ └── MyAuthenticationFailureHandler.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── formlogin
│ │ └── FormloginApplicationTests.java
└── multiuser-mybatis
│ └── src
│ ├── main
│ ├── resources
│ │ ├── application.properties
│ │ └── static
│ │ │ └── index.html
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── formlogin
│ │ ├── FormloginApplication.java
│ │ ├── mapper
│ │ ├── UserMapper.xml
│ │ ├── UserMapper2.xml
│ │ ├── UserMapper.java
│ │ └── UserMapper2.java
│ │ ├── controller
│ │ └── MyLoginController.java
│ │ ├── model
│ │ └── Role.java
│ │ ├── service
│ │ ├── MyUserDetailsService2.java
│ │ └── MyUserDetailsService.java
│ │ └── config
│ │ ├── MyAuthenticationSuccessHandler.java
│ │ └── MyAuthenticationFailureHandler.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── formlogin
│ └── FormloginApplicationTests.java
├── chapter04
├── json_login
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── json_login
│ │ │ └── JsonLoginApplication.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── json_login
│ │ └── JsonLoginApplicationTests.java
├── filter_kaptcha
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── index.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── formlogin
│ │ │ ├── FormloginApplication.java
│ │ │ ├── controller
│ │ │ └── MyLoginController.java
│ │ │ └── config
│ │ │ └── KaptchaConfig.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── formlogin
│ │ └── FormloginApplicationTests.java
├── ignoredrequests
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ ├── images
│ │ │ │ └── bg.png
│ │ │ │ └── css
│ │ │ │ └── font-awesome-4.7.0
│ │ │ │ └── fonts
│ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ ├── fontawesome-webfont.woff
│ │ │ │ └── fontawesome-webfont.woff2
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── ignoredrequests
│ │ │ ├── IgnoredrequestsApplication.java
│ │ │ └── SecurityConfig.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── ignoredrequests
│ │ └── IgnoredrequestsApplicationTests.java
├── multi_users01
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── multi_users01
│ │ │ ├── MultiUsers01Application.java
│ │ │ ├── HelloController.java
│ │ │ └── SecurityConfig.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── multi_users01
│ │ └── MultiUsers01ApplicationTests.java
├── multi_users02
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── multi_users02
│ │ │ ├── MultiUsers02Application.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── multi_users02
│ │ └── MultiUsers02ApplicationTests.java
├── multi_users03
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── multi_users03
│ │ │ ├── MultiUsers03Application.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── multi_users03
│ │ └── MultiUsers03ApplicationTests.java
├── startanalysis
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── META-INF
│ │ │ │ └── spring.factories
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── startanalysis
│ │ │ └── StartanalysisApplication.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── startanalysis
│ │ └── StartanalysisApplicationTests.java
├── multi_filter_chain
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── multi_filter_chain
│ │ │ ├── MultiFilterChainApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── multi_filter_chain
│ │ └── MultiFilterChainApplicationTests.java
└── objectpostprocessor
│ └── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── objectpostprocessor
│ │ ├── ObjectpostprocessorApplication.java
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── objectpostprocessor
│ └── ObjectpostprocessorApplicationTests.java
├── chapter09
├── csrf-1
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── csrf1
│ │ │ ├── Csrf1Application.java
│ │ │ ├── HelloController.java
│ │ │ └── SecurityConfig.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── csrf1
│ │ └── Csrf1ApplicationTests.java
├── token_in_cookie
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── login.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── token_in_cookie
│ │ │ ├── TokenInCookieApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── token_in_cookie
│ │ └── TokenInCookieApplicationTests.java
├── csrf-2
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── index.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── csrf2
│ │ │ └── Csrf2Application.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── csrf2
│ │ └── Csrf2ApplicationTests.java
├── receive_report
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── receive_report
│ │ │ ├── ReceiveReportApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── receive_report
│ │ └── ReceiveReportApplicationTests.java
├── http_response_headers
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── static
│ │ │ │ ├── 01.css
│ │ │ │ ├── hello.html
│ │ │ │ └── 01.html
│ │ │ ├── javaboy.p12
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── http_response_headers
│ │ │ └── HttpResponseHeadersApplication.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── http_response_headers
│ │ └── HttpResponseHeadersApplicationTests.java
├── samesite
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── samesite
│ │ │ ├── SamesiteApplication.java
│ │ │ ├── HelloController.java
│ │ │ └── WebMvcConfig.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── samesite
│ │ └── SamesiteApplicationTests.java
├── synchronizer_token_pattern
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── templates
│ │ │ │ ├── index.html
│ │ │ │ └── index2.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── synchronizer_token_pattern
│ │ │ ├── SynchronizerTokenPatternApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── synchronizer_token_pattern
│ │ └── SynchronizerTokenPatternApplicationTests.java
└── http
│ └── src
│ ├── main
│ ├── resources
│ │ ├── javaboy.p12
│ │ └── application.properties
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── http
│ │ ├── HttpApplication.java
│ │ ├── HelloController.java
│ │ ├── SecurityConfig.java
│ │ └── TomcatConfig.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── http
│ └── HttpApplicationTests.java
├── chapter06
├── rememberme
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── rememberme
│ │ │ ├── RemembermeApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── rememberme
│ │ └── RemembermeApplicationTests.java
└── rememberme_persistent
│ ├── src
│ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── rememberme
│ │ │ ├── RemembermeApplication.java
│ │ │ └── HelloController.java
│ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── rememberme
│ │ └── RemembermeApplicationTests.java
│ └── security06.sql
├── chapter10
├── http_basic
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── http_basic
│ │ │ ├── HttpBasicApplication.java
│ │ │ ├── HelloController.java
│ │ │ └── SecurityConfig.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── http_basic
│ │ └── HttpBasicApplicationTests.java
└── http_digest
│ └── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── http_digest
│ │ ├── HttpDigestApplication.java
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── http_digest
│ └── HttpDigestApplicationTests.java
├── chapter05
├── passwordencoder
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── passwordencoder
│ │ │ ├── PasswordencoderApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── passwordencoder
│ │ └── PasswordencoderApplicationTests.java
└── passwordencoder02
│ ├── src
│ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── passwordencoder
│ │ │ ├── PasswordencoderApplication.java
│ │ │ ├── mapper
│ │ │ ├── UserMapper.xml
│ │ │ └── UserMapper.java
│ │ │ └── HelloController.java
│ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── passwordencoder
│ │ └── PasswordencoderApplicationTests.java
│ └── security05.sql
├── chapter07
├── sessionmanager
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── sessionmanager
│ │ │ ├── SessionmanagerApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── sessionmanager
│ │ └── SessionmanagerApplicationTests.java
└── sessionshare
│ └── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── sessionshare
│ │ ├── SessionshareApplication.java
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── sessionshare
│ └── SessionshareApplicationTests.java
├── chapter13
├── based_on_method
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── application.properties
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── based_on_method
│ │ ├── BasedOnMethodApplication.java
│ │ ├── SecurityConfig.java
│ │ └── User.java
├── based_on_url
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── based_on_url
│ │ │ ├── BasedOnUrlApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── based_on_url
│ │ └── BasedOnUrlApplicationTests.java
├── custom_expression
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── based_on_url
│ │ │ ├── BasedOnUrlApplication.java
│ │ │ ├── PermissionExpression.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── based_on_url
│ │ └── BasedOnUrlApplicationTests.java
└── base_on_url_dy
│ └── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── base_on_url_dy
│ │ ├── BaseOnUrlDyApplication.java
│ │ ├── mapper
│ │ ├── MenuMapper.java
│ │ ├── UserMapper.xml
│ │ ├── UserMapper.java
│ │ └── MenuMapper.xml
│ │ ├── service
│ │ ├── MenuService.java
│ │ └── UserService.java
│ │ ├── model
│ │ ├── Role.java
│ │ └── Menu.java
│ │ └── controller
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── base_on_url_dy
│ └── BaseOnUrlDyApplicationTests.java
├── chapter15
├── oauth2_login_demo3
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── oauth2_login_demo3
│ │ │ ├── Oauth2LoginDemo3Application.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── oauth2_login_demo3
│ │ └── Oauth2LoginDemo3ApplicationTests.java
├── oauth2
│ ├── auth_server_jwt
│ │ └── src
│ │ │ ├── main
│ │ │ ├── resources
│ │ │ │ ├── application.properties
│ │ │ │ └── jwt.jks
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── javaboy
│ │ │ │ └── auth_server_jwt
│ │ │ │ ├── AuthServerJwtApplication.java
│ │ │ │ └── HelloController.java
│ │ │ └── test
│ │ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── auth_server_jwt
│ │ │ └── AuthServerJwtApplicationTests.java
│ ├── res_server_jwt
│ │ └── src
│ │ │ ├── main
│ │ │ ├── resources
│ │ │ │ └── application.yaml
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── javaboy
│ │ │ │ └── res_server_jwt
│ │ │ │ ├── ResServerJwtApplication.java
│ │ │ │ ├── HelloController.java
│ │ │ │ └── config
│ │ │ │ └── OAuth2ResourceServerSecurityConfiguration.java
│ │ │ └── test
│ │ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── res_server_jwt
│ │ │ └── ResServerJwtApplicationTests.java
│ ├── auth_server
│ │ └── src
│ │ │ ├── main
│ │ │ ├── resources
│ │ │ │ └── application.properties
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── javaboy
│ │ │ │ └── auth_server
│ │ │ │ ├── AuthServerApplication.java
│ │ │ │ ├── HelloController.java
│ │ │ │ └── config
│ │ │ │ └── AccessTokenConfig.java
│ │ │ └── test
│ │ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── auth_server
│ │ │ └── AuthServerApplicationTests.java
│ ├── auth_server_redis
│ │ └── src
│ │ │ ├── main
│ │ │ ├── resources
│ │ │ │ └── application.properties
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── javaboy
│ │ │ │ └── auth_server_redis
│ │ │ │ ├── AuthServerRedisApplication.java
│ │ │ │ ├── HelloController.java
│ │ │ │ └── config
│ │ │ │ └── AccessTokenConfig.java
│ │ │ └── test
│ │ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── auth_server_redis
│ │ │ └── AuthServerRedisApplicationTests.java
│ ├── res_server
│ │ └── src
│ │ │ ├── main
│ │ │ ├── resources
│ │ │ │ └── application.yaml
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── javaboy
│ │ │ │ └── res_server
│ │ │ │ ├── ResServerApplication.java
│ │ │ │ └── HelloController.java
│ │ │ └── test
│ │ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── res_server
│ │ │ └── ResServerApplicationTests.java
│ ├── client02
│ │ └── src
│ │ │ ├── test
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── javaboy
│ │ │ │ └── client02
│ │ │ │ └── Client02ApplicationTests.java
│ │ │ └── main
│ │ │ ├── java
│ │ │ └── org
│ │ │ │ └── javaboy
│ │ │ │ └── client02
│ │ │ │ └── Client02Application.java
│ │ │ └── resources
│ │ │ └── application.yml
│ ├── auth_server_jdbc
│ │ └── src
│ │ │ ├── test
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── javaboy
│ │ │ │ └── auth_server_jdbc
│ │ │ │ └── AuthServerJdbcApplicationTests.java
│ │ │ └── main
│ │ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── oauth_client_details.sql
│ │ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── auth_server_jdbc
│ │ │ ├── AuthServerJdbcApplication.java
│ │ │ ├── HelloController.java
│ │ │ └── config
│ │ │ └── AccessTokenConfig.java
│ └── pom.xml
├── oauth2_login_demo
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── oauth2_login_demo
│ │ │ ├── Oauth2LoginDemoApplication.java
│ │ │ ├── SecurityConfig.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── oauth2_login_demo
│ │ └── Oauth2LoginDemoApplicationTests.java
└── oauth2_login_demo2
│ └── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── oauth2_login_demo2
│ │ ├── Oauth2LoginDemo2Application.java
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── oauth2_login_demo2
│ └── Oauth2LoginDemo2ApplicationTests.java
├── chapter11
├── cors01_corsfilter
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── 01.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── cors01
│ │ │ ├── Cors01Application.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── cors01
│ │ └── Cors01ApplicationTests.java
├── cors01_crossorigin
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── 01.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── cors01
│ │ │ ├── Cors01Application.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── cors01
│ │ └── Cors01ApplicationTests.java
├── cors02
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ ├── index.html
│ │ │ │ └── login.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── cors02
│ │ │ └── Cors02Application.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── cors02
│ │ └── Cors02ApplicationTests.java
├── cors01_addcorsmappings
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── 01.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── cors01
│ │ │ ├── Cors01Application.java
│ │ │ ├── HelloController.java
│ │ │ └── WebMvcConfig.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── cors01
│ │ └── Cors01ApplicationTests.java
├── cors_security
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── cors_security
│ │ │ ├── CorsSecurityApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── cors_security
│ │ └── CorsSecurityApplicationTests.java
├── cors_security_crossorigin
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── cors_security
│ │ │ ├── CorsSecurityApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── cors_security
│ │ └── CorsSecurityApplicationTests.java
└── cors_security_corsfilter
│ └── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── cors_security
│ │ ├── CorsSecurityApplication.java
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── cors_security
│ └── CorsSecurityApplicationTests.java
├── chapter02
├── formlogin
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── index.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── formlogin
│ │ │ ├── FormloginApplication.java
│ │ │ ├── MyLoginController.java
│ │ │ ├── MyAuthenticationSuccessHandler.java
│ │ │ └── MyAuthenticationFailureHandler.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── formlogin
│ │ └── FormloginApplicationTests.java
├── getloginuser
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── getloginuser
│ │ │ ├── GetloginuserApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── getloginuser
│ │ └── GetloginuserApplicationTests.java
├── user-in-memory
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── index.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── formlogin
│ │ │ ├── FormloginApplication.java
│ │ │ ├── MyLoginController.java
│ │ │ ├── MyAuthenticationSuccessHandler.java
│ │ │ └── MyAuthenticationFailureHandler.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── formlogin
│ │ └── FormloginApplicationTests.java
├── firstdemo
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── firstdemo
│ │ │ ├── FirstdemoApplication.java
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── firstdemo
│ │ └── FirstdemoApplicationTests.java
├── jpa
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── static
│ │ │ │ └── index.html
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── formlogin
│ │ │ ├── FormloginApplication.java
│ │ │ ├── mapper
│ │ │ └── UserDao.java
│ │ │ ├── controller
│ │ │ └── MyLoginController.java
│ │ │ ├── service
│ │ │ └── MyUserDetailsService.java
│ │ │ ├── config
│ │ │ ├── MyAuthenticationSuccessHandler.java
│ │ │ └── MyAuthenticationFailureHandler.java
│ │ │ └── model
│ │ │ └── Role.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── formlogin
│ │ └── FormloginApplicationTests.java
├── mybatis
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── index.html
│ │ └── java
│ │ │ └── org
│ │ │ └── javaboy
│ │ │ └── formlogin
│ │ │ ├── FormloginApplication.java
│ │ │ ├── mapper
│ │ │ ├── UserMapper.xml
│ │ │ └── UserMapper.java
│ │ │ ├── controller
│ │ │ └── MyLoginController.java
│ │ │ ├── model
│ │ │ └── Role.java
│ │ │ ├── service
│ │ │ └── MyUserDetailsService.java
│ │ │ └── config
│ │ │ ├── MyAuthenticationSuccessHandler.java
│ │ │ └── MyAuthenticationFailureHandler.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── formlogin
│ │ └── FormloginApplicationTests.java
└── jdbcuserdetailsmanager
│ └── src
│ ├── main
│ ├── resources
│ │ ├── application.properties
│ │ └── static
│ │ │ └── index.html
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── formlogin
│ │ ├── FormloginApplication.java
│ │ ├── MyLoginController.java
│ │ ├── MyAuthenticationSuccessHandler.java
│ │ └── MyAuthenticationFailureHandler.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── formlogin
│ └── FormloginApplicationTests.java
├── chapter12
└── exception_translation_filter
│ └── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── exception_translation_filter
│ │ ├── ExceptionTranslationFilterApplication.java
│ │ ├── GlobalException.java
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── exception_translation_filter
│ └── ExceptionTranslationFilterApplicationTests.java
├── chapter08
└── httpfirewall
│ └── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── org
│ │ └── javaboy
│ │ └── httpfirewall
│ │ ├── HttpfirewallApplication.java
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── org
│ └── javaboy
│ └── httpfirewall
│ └── HttpfirewallApplicationTests.java
├── README.md
└── chapter14
└── acl
└── src
└── main
├── resources
├── application.properties
├── system_message.sql
└── data.sql
└── java
└── org
└── javaboy
└── acl
├── AclApplication.java
├── mapper
├── NoticeMessageMapper.java
└── NoticeMessageMapper.xml
└── model
└── NoticeMessage.java
/chapter03/kaptcha/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter03/multiuser/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter04/json_login/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter09/csrf-1/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter04/filter_kaptcha/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter06/rememberme/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter09/token_in_cookie/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter10/http_basic/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter10/http_digest/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter04/ignoredrequests/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter04/multi_users01/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter04/multi_users02/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter04/multi_users03/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter04/startanalysis/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter05/passwordencoder/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter07/sessionmanager/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter13/based_on_method/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter13/based_on_url/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter15/oauth2_login_demo3/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/chapter04/multi_filter_chain/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter09/csrf-2/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8081
--------------------------------------------------------------------------------
/chapter11/cors01_corsfilter/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter11/cors01_crossorigin/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter11/cors02/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8081
--------------------------------------------------------------------------------
/chapter13/custom_expression/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter09/receive_report/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8081
--------------------------------------------------------------------------------
/chapter11/cors01_addcorsmappings/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server_jwt/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8881
--------------------------------------------------------------------------------
/chapter15/oauth2/res_server_jwt/src/main/resources/application.yaml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8882
--------------------------------------------------------------------------------
/chapter09/http_response_headers/src/main/resources/static/01.css:
--------------------------------------------------------------------------------
1 | body{
2 | background-color: #ff0114;
3 | }
--------------------------------------------------------------------------------
/chapter02/formlogin/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8881
2 | logging.level.org.springframework=debug
--------------------------------------------------------------------------------
/chapter02/getloginuser/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
--------------------------------------------------------------------------------
/chapter02/user-in-memory/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
--------------------------------------------------------------------------------
/chapter11/cors_security/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
--------------------------------------------------------------------------------
/chapter04/objectpostprocessor/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
--------------------------------------------------------------------------------
/chapter07/sessionshare/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.redis.password=123
2 | spring.redis.host=127.0.0.1
3 | spring.redis.port=6379
--------------------------------------------------------------------------------
/chapter09/samesite/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.redis.password=123
2 | spring.redis.host=127.0.0.1
3 | spring.redis.port=6379
--------------------------------------------------------------------------------
/chapter11/cors_security_crossorigin/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
--------------------------------------------------------------------------------
/chapter09/synchronizer_token_pattern/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
--------------------------------------------------------------------------------
/chapter12/exception_translation_filter/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
--------------------------------------------------------------------------------
/chapter09/http/src/main/resources/javaboy.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lenve/spring-security-book-samples/HEAD/chapter09/http/src/main/resources/javaboy.p12
--------------------------------------------------------------------------------
/chapter02/firstdemo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
3 | spring.security.user.roles=admin,user
--------------------------------------------------------------------------------
/chapter08/httpfirewall/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
3 |
4 | #server.servlet.context-path=/javaboy
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server_jwt/src/main/resources/jwt.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lenve/spring-security-book-samples/HEAD/chapter15/oauth2/auth_server_jwt/src/main/resources/jwt.jks
--------------------------------------------------------------------------------
/chapter11/cors_security_corsfilter/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
3 |
4 | spring.security.filter.order=-100
--------------------------------------------------------------------------------
/chapter09/http_response_headers/src/main/resources/javaboy.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lenve/spring-security-book-samples/HEAD/chapter09/http_response_headers/src/main/resources/javaboy.p12
--------------------------------------------------------------------------------
/chapter04/ignoredrequests/src/main/resources/static/images/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lenve/spring-security-book-samples/HEAD/chapter04/ignoredrequests/src/main/resources/static/images/bg.png
--------------------------------------------------------------------------------
/chapter04/startanalysis/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer=org.springframework.security.config.annotation.web.configurers.CorsConfigurer
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server_redis/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8881
2 | logging.level.org.springframework=debug
3 |
4 | spring.redis.host=127.0.0.1
5 | spring.redis.port=6379
6 | spring.redis.password=123
7 |
--------------------------------------------------------------------------------
/chapter02/jpa/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 江南一点雨
6 |
7 |
8 | hello 江南一点雨~
9 |
10 |
--------------------------------------------------------------------------------
/chapter02/formlogin/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 江南一点雨
6 |
7 |
8 | hello 江南一点雨~
9 |
10 |
--------------------------------------------------------------------------------
/chapter02/mybatis/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.username=root
2 | spring.datasource.password=123
3 | spring.datasource.url=jdbc:mysql:///security02?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
--------------------------------------------------------------------------------
/chapter02/mybatis/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 江南一点雨
6 |
7 |
8 | hello 江南一点雨~
9 |
10 |
--------------------------------------------------------------------------------
/chapter03/kaptcha/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 江南一点雨
6 |
7 |
8 | hello 江南一点雨~
9 |
10 |
--------------------------------------------------------------------------------
/chapter03/multiuser/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 江南一点雨
6 |
7 |
8 | hello 江南一点雨~
9 |
10 |
--------------------------------------------------------------------------------
/chapter11/cors01_corsfilter/src/main/resources/static/01.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 | 01.html
9 |
10 |
--------------------------------------------------------------------------------
/chapter11/cors01_crossorigin/src/main/resources/static/01.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 | 01.html
9 |
10 |
--------------------------------------------------------------------------------
/chapter02/user-in-memory/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 江南一点雨
6 |
7 |
8 | hello 江南一点雨~
9 |
10 |
--------------------------------------------------------------------------------
/chapter04/filter_kaptcha/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 江南一点雨
6 |
7 |
8 | hello 江南一点雨~
9 |
10 |
--------------------------------------------------------------------------------
/chapter11/cors01_addcorsmappings/src/main/resources/static/01.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 | 01.html
9 |
10 |
--------------------------------------------------------------------------------
/chapter03/multiuser-mybatis/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.username=root
2 | spring.datasource.password=123
3 | spring.datasource.url=jdbc:mysql:///security02?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
--------------------------------------------------------------------------------
/chapter03/multiuser-mybatis/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 江南一点雨
6 |
7 |
8 | hello 江南一点雨~
9 |
10 |
--------------------------------------------------------------------------------
/chapter05/passwordencoder02/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.username=root
2 | spring.datasource.password=123
3 | spring.datasource.url=jdbc:mysql:///security05?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
--------------------------------------------------------------------------------
/chapter13/base_on_url_dy/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.username=root
2 | spring.datasource.password=123
3 | spring.datasource.url=jdbc:mysql:///security13?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
4 |
--------------------------------------------------------------------------------
/chapter15/oauth2_login_demo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.oauth2.client.registration.github.client-id=aa9e79846df9cbc6201f
2 | spring.security.oauth2.client.registration.github.client-secret=c324b93443594fe84d106bb32c904799e1839e6a
--------------------------------------------------------------------------------
/chapter02/jdbcuserdetailsmanager/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.username=root
2 | spring.datasource.password=123
3 | spring.datasource.url=jdbc:mysql:///security?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
4 |
--------------------------------------------------------------------------------
/chapter02/jdbcuserdetailsmanager/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 江南一点雨
6 |
7 |
8 | hello 江南一点雨~
9 |
10 |
--------------------------------------------------------------------------------
/chapter06/rememberme_persistent/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql:///security06?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
2 | spring.datasource.username=root
3 | spring.datasource.password=123
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # spring-security-book-samples
2 |
3 | 这是 **《深入浅出 Spring Security》** 一书的配套案例。
4 |
5 | 图书购买地址:[京东](https://item.jd.com/13131798.html)
6 |
7 | 关注微信公众号【江南一点雨】,回复 `ss`,获取更多 Spring Security 学习资料。
8 |
9 | 
--------------------------------------------------------------------------------
/chapter04/ignoredrequests/src/main/resources/static/css/font-awesome-4.7.0/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lenve/spring-security-book-samples/HEAD/chapter04/ignoredrequests/src/main/resources/static/css/font-awesome-4.7.0/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/chapter04/ignoredrequests/src/main/resources/static/css/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lenve/spring-security-book-samples/HEAD/chapter04/ignoredrequests/src/main/resources/static/css/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/chapter04/ignoredrequests/src/main/resources/static/css/font-awesome-4.7.0/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lenve/spring-security-book-samples/HEAD/chapter04/ignoredrequests/src/main/resources/static/css/font-awesome-4.7.0/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/chapter04/ignoredrequests/src/main/resources/static/css/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lenve/spring-security-book-samples/HEAD/chapter04/ignoredrequests/src/main/resources/static/css/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/chapter09/http/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
3 |
4 | server.port=8444
5 |
6 | server.ssl.key-store=classpath:javaboy.p12
7 | server.ssl.key-alias=tomcathttps
8 | server.ssl.key-store-password=111111
9 |
--------------------------------------------------------------------------------
/chapter14/acl/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql:///acls?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
2 | spring.datasource.username=root
3 | spring.datasource.password=123
4 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
--------------------------------------------------------------------------------
/chapter14/acl/src/main/resources/system_message.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE `system_message` (
2 | `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
3 | `content` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
4 | PRIMARY KEY (`id`)
5 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--------------------------------------------------------------------------------
/chapter09/http_response_headers/src/main/resources/static/hello.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
9 | hello.html
10 |
11 |
--------------------------------------------------------------------------------
/chapter09/http_response_headers/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.user.name=javaboy
2 | spring.security.user.password=123
3 |
4 | logging.level.org.springframework.security=debug
5 |
6 | server.ssl.key-store=classpath:javaboy.p12
7 | server.ssl.key-alias=tomcathttps
8 | server.ssl.key-store-password=111111
--------------------------------------------------------------------------------
/chapter09/http/src/test/java/org/javaboy/http/HttpApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.http;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class HttpApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter13/base_on_url_dy/src/test/java/org/javaboy/base_on_url_dy/BaseOnUrlDyApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.base_on_url_dy;
2 |
3 | import org.springframework.boot.test.context.SpringBootTest;
4 |
5 | @SpringBootTest
6 | class BaseOnUrlDyApplicationTests {
7 |
8 | // @Test
9 | void contextLoads() {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter09/csrf-1/src/test/java/org/javaboy/csrf1/Csrf1ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.csrf1;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class Csrf1ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/csrf-2/src/test/java/org/javaboy/csrf2/Csrf2ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.csrf2;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class Csrf2ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors02/src/test/java/org/javaboy/cors02/Cors02ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors02;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class Cors02ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/res_server/src/main/resources/application.yaml:
--------------------------------------------------------------------------------
1 | spring:
2 | security:
3 | oauth2:
4 | resourceserver:
5 | opaque:
6 | introspection-uri: http://auth.javaboy.org:8881/oauth/check_token
7 | introspection-client-id: my_client
8 | introspection-client-secret: 123
9 | server:
10 | port: 8882
--------------------------------------------------------------------------------
/chapter15/oauth2_login_demo2/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.security.oauth2.client.registration.github.client-id=aa9e79846df9cbc6201f
2 | spring.security.oauth2.client.registration.github.client-secret=c324b93443594fe84d106bb32c904799e1839e6a
3 | spring.security.oauth2.client.registration.github.redirect-uri=http://localhost:8080/authorization_code
--------------------------------------------------------------------------------
/chapter09/samesite/src/test/java/org/javaboy/samesite/SamesiteApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.samesite;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class SamesiteApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors01_corsfilter/src/test/java/org/javaboy/cors01/Cors01ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors01;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class Cors01ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/formlogin/src/test/java/org/javaboy/formlogin/FormloginApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class FormloginApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/mybatis/src/test/java/org/javaboy/formlogin/FormloginApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class FormloginApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter03/kaptcha/src/test/java/org/javaboy/formlogin/FormloginApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class FormloginApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter03/multiuser/src/test/java/org/javaboy/formlogin/FormloginApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class FormloginApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors01_addcorsmappings/src/test/java/org/javaboy/cors01/Cors01ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors01;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class Cors01ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors01_crossorigin/src/test/java/org/javaboy/cors01/Cors01ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors01;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class Cors01ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/user-in-memory/src/test/java/org/javaboy/formlogin/FormloginApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class FormloginApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/filter_kaptcha/src/test/java/org/javaboy/formlogin/FormloginApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class FormloginApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/json_login/src/test/java/org/javaboy/json_login/JsonLoginApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.json_login;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class JsonLoginApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter10/http_basic/src/test/java/org/javaboy/http_basic/HttpBasicApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.http_basic;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class HttpBasicApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/client02/src/test/java/org/javaboy/client02/Client02ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.client02;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class Client02ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter03/multiuser-mybatis/src/test/java/org/javaboy/formlogin/FormloginApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class FormloginApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter13/based_on_url/src/test/java/org/javaboy/based_on_url/BasedOnUrlApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.based_on_url;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class BasedOnUrlApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/res_server/src/test/java/org/javaboy/res_server/ResServerApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.res_server;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class ResServerApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/getloginuser/src/test/java/org/javaboy/getloginuser/GetloginuserApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.getloginuser;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class GetloginuserApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/jdbcuserdetailsmanager/src/test/java/org/javaboy/formlogin/FormloginApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class FormloginApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter07/sessionshare/src/test/java/org/javaboy/sessionshare/SessionshareApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.sessionshare;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class SessionshareApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter13/custom_expression/src/test/java/org/javaboy/based_on_url/BasedOnUrlApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.based_on_url;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class BasedOnUrlApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter14/acl/src/main/resources/data.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO `acl_class` (`id`, `class`)
2 | VALUES
3 | (1,'org.javaboy.acls.model.NoticeMessage');
4 | INSERT INTO `acl_sid` (`id`, `principal`, `sid`)
5 | VALUES
6 | (2,1,'hr'),
7 | (1,1,'manager'),
8 | (3,0,'ROLE_EDITOR');
9 | INSERT INTO `system_message` (`id`, `content`)
10 | VALUES
11 | (1,'111'),
12 | (2,'222'),
13 | (3,'333');
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server/src/test/java/org/javaboy/auth_server/AuthServerApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.auth_server;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class AuthServerApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/multi_users01/src/test/java/org/javaboy/multi_users01/MultiUsers01ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.multi_users01;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class MultiUsers01ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/multi_users02/src/test/java/org/javaboy/multi_users02/MultiUsers02ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.multi_users02;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class MultiUsers02ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/multi_users03/src/test/java/org/javaboy/multi_users03/MultiUsers03ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.multi_users03;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class MultiUsers03ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors_security/src/test/java/org/javaboy/cors_security/CorsSecurityApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors_security;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class CorsSecurityApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter07/sessionmanager/src/test/java/org/javaboy/sessionmanager/SessionmanagerApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.sessionmanager;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class SessionmanagerApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/receive_report/src/test/java/org/javaboy/receive_report/ReceiveReportApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.receive_report;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class ReceiveReportApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/token_in_cookie/src/test/java/org/javaboy/token_in_cookie/TokenInCookieApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.token_in_cookie;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class TokenInCookieApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/ignoredrequests/src/test/java/org/javaboy/ignoredrequests/IgnoredrequestsApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.ignoredrequests;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class IgnoredrequestsApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors_security_corsfilter/src/test/java/org/javaboy/cors_security/CorsSecurityApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors_security;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class CorsSecurityApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors_security_crossorigin/src/test/java/org/javaboy/cors_security/CorsSecurityApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors_security;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class CorsSecurityApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/res_server_jwt/src/test/java/org/javaboy/res_server_jwt/ResServerJwtApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.res_server_jwt;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class ResServerJwtApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server_jwt/src/test/java/org/javaboy/auth_server_jwt/AuthServerJwtApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.auth_server_jwt;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class AuthServerJwtApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2_login_demo/src/test/java/org/javaboy/oauth2_login_demo/Oauth2LoginDemoApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.oauth2_login_demo;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class Oauth2LoginDemoApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/multi_filter_chain/src/test/java/org/javaboy/multi_filter_chain/MultiFilterChainApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.multi_filter_chain;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class MultiFilterChainApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server_jdbc/src/test/java/org/javaboy/auth_server_jdbc/AuthServerJdbcApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.auth_server_jdbc;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class AuthServerJdbcApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2_login_demo2/src/test/java/org/javaboy/oauth2_login_demo2/Oauth2LoginDemo2ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.oauth2_login_demo2;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class Oauth2LoginDemo2ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2_login_demo3/src/test/java/org/javaboy/oauth2_login_demo3/Oauth2LoginDemo3ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.oauth2_login_demo3;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class Oauth2LoginDemo3ApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server_redis/src/test/java/org/javaboy/auth_server_redis/AuthServerRedisApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.auth_server_redis;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class AuthServerRedisApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/objectpostprocessor/src/test/java/org/javaboy/objectpostprocessor/ObjectpostprocessorApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.objectpostprocessor;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class ObjectpostprocessorApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/http_response_headers/src/main/resources/static/01.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
9 |
10 | 01.html
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/chapter09/http_response_headers/src/test/java/org/javaboy/http_response_headers/HttpResponseHeadersApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.http_response_headers;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class HttpResponseHeadersApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter14/acl/src/main/java/org/javaboy/acl/AclApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.acl;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class AclApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(AclApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/http/src/main/java/org/javaboy/http/HttpApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.http;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class HttpApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(HttpApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/csrf-1/src/main/java/org/javaboy/csrf1/Csrf1Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.csrf1;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Csrf1Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Csrf1Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/csrf-2/src/main/java/org/javaboy/csrf2/Csrf2Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.csrf2;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Csrf2Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Csrf2Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/csrf-2/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/chapter09/synchronizer_token_pattern/src/test/java/org/javaboy/synchronizer_token_pattern/SynchronizerTokenPatternApplicationTests.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.synchronizer_token_pattern;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class SynchronizerTokenPatternApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors02/src/main/java/org/javaboy/cors02/Cors02Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors02;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Cors02Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Cors02Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/jpa/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.username=root
2 | spring.datasource.password=123
3 | spring.datasource.url=jdbc:mysql:///security03?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
4 |
5 | spring.jpa.database=mysql
6 | spring.jpa.database-platform=mysql
7 | spring.jpa.hibernate.ddl-auto=update
8 | spring.jpa.show-sql=true
9 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
--------------------------------------------------------------------------------
/chapter09/synchronizer_token_pattern/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/chapter09/synchronizer_token_pattern/src/main/resources/templates/index2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/chapter02/jpa/src/main/java/org/javaboy/formlogin/FormloginApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class FormloginApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(FormloginApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/samesite/src/main/java/org/javaboy/samesite/SamesiteApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.samesite;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class SamesiteApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(SamesiteApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors01_corsfilter/src/main/java/org/javaboy/cors01/Cors01Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors01;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Cors01Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Cors01Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors01_crossorigin/src/main/java/org/javaboy/cors01/Cors01Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors01;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Cors01Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Cors01Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server_jdbc/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8881
2 | logging.level.org.springframework=debug
3 |
4 | spring.datasource.url=jdbc:mysql:///security15?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
5 | spring.datasource.password=123
6 | spring.datasource.username=root
7 |
8 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
9 |
10 | spring.main.allow-bean-definition-overriding=true
--------------------------------------------------------------------------------
/chapter03/kaptcha/src/main/java/org/javaboy/formlogin/FormloginApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class FormloginApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(FormloginApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors01_addcorsmappings/src/main/java/org/javaboy/cors01/Cors01Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors01;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Cors01Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Cors01Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/firstdemo/src/main/java/org/javaboy/firstdemo/FirstdemoApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.firstdemo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class FirstdemoApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(FirstdemoApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/formlogin/src/main/java/org/javaboy/formlogin/FormloginApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class FormloginApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(FormloginApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter03/multiuser/src/main/java/org/javaboy/formlogin/FormloginApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class FormloginApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(FormloginApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/json_login/src/main/java/org/javaboy/json_login/JsonLoginApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.json_login;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class JsonLoginApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(JsonLoginApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter10/http_basic/src/main/java/org/javaboy/http_basic/HttpBasicApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.http_basic;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class HttpBasicApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(HttpBasicApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/client02/src/main/java/org/javaboy/client02/Client02Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.client02;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Client02Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Client02Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/user-in-memory/src/main/java/org/javaboy/formlogin/FormloginApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class FormloginApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(FormloginApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/filter_kaptcha/src/main/java/org/javaboy/formlogin/FormloginApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class FormloginApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(FormloginApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter06/rememberme/src/main/java/org/javaboy/rememberme/RemembermeApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.rememberme;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class RemembermeApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(RemembermeApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter10/http_digest/src/main/java/org/javaboy/http_digest/HttpDigestApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.http_digest;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class HttpDigestApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(HttpDigestApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/jdbcuserdetailsmanager/src/main/java/org/javaboy/formlogin/FormloginApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class FormloginApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(FormloginApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter13/based_on_url/src/main/java/org/javaboy/based_on_url/BasedOnUrlApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.based_on_url;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class BasedOnUrlApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(BasedOnUrlApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/res_server/src/main/java/org/javaboy/res_server/ResServerApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.res_server;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ResServerApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ResServerApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/getloginuser/src/main/java/org/javaboy/getloginuser/GetloginuserApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.getloginuser;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class GetloginuserApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(GetloginuserApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter06/rememberme_persistent/src/main/java/org/javaboy/rememberme/RemembermeApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.rememberme;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class RemembermeApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(RemembermeApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter07/sessionshare/src/main/java/org/javaboy/sessionshare/SessionshareApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.sessionshare;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class SessionshareApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(SessionshareApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter08/httpfirewall/src/main/java/org/javaboy/httpfirewall/HttpfirewallApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.httpfirewall;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class HttpfirewallApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(HttpfirewallApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter13/custom_expression/src/main/java/org/javaboy/based_on_url/BasedOnUrlApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.based_on_url;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class BasedOnUrlApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(BasedOnUrlApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server/src/main/java/org/javaboy/auth_server/AuthServerApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.auth_server;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class AuthServerApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(AuthServerApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/multi_users01/src/main/java/org/javaboy/multi_users01/MultiUsers01Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.multi_users01;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MultiUsers01Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MultiUsers01Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/multi_users02/src/main/java/org/javaboy/multi_users02/MultiUsers02Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.multi_users02;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MultiUsers02Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MultiUsers02Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/multi_users03/src/main/java/org/javaboy/multi_users03/MultiUsers03Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.multi_users03;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MultiUsers03Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MultiUsers03Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/startanalysis/src/main/java/org/javaboy/startanalysis/StartanalysisApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.startanalysis;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class StartanalysisApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(StartanalysisApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors_security/src/main/java/org/javaboy/cors_security/CorsSecurityApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors_security;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class CorsSecurityApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(CorsSecurityApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter13/base_on_url_dy/src/main/java/org/javaboy/base_on_url_dy/BaseOnUrlDyApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.base_on_url_dy;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class BaseOnUrlDyApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(BaseOnUrlDyApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | org.javaboy
8 | oauth2
9 | 1.0-SNAPSHOT
10 |
11 |
12 |
--------------------------------------------------------------------------------
/chapter09/receive_report/src/main/java/org/javaboy/receive_report/ReceiveReportApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.receive_report;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ReceiveReportApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ReceiveReportApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter07/sessionmanager/src/main/java/org/javaboy/sessionmanager/SessionmanagerApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.sessionmanager;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class SessionmanagerApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(SessionmanagerApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/token_in_cookie/src/main/java/org/javaboy/token_in_cookie/TokenInCookieApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.token_in_cookie;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class TokenInCookieApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(TokenInCookieApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors_security_corsfilter/src/main/java/org/javaboy/cors_security/CorsSecurityApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors_security;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class CorsSecurityApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(CorsSecurityApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter11/cors_security_crossorigin/src/main/java/org/javaboy/cors_security/CorsSecurityApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.cors_security;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class CorsSecurityApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(CorsSecurityApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter13/based_on_method/src/main/java/org/javaboy/based_on_method/BasedOnMethodApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.based_on_method;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class BasedOnMethodApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(BasedOnMethodApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/res_server_jwt/src/main/java/org/javaboy/res_server_jwt/ResServerJwtApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.res_server_jwt;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ResServerJwtApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ResServerJwtApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/ignoredrequests/src/main/java/org/javaboy/ignoredrequests/IgnoredrequestsApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.ignoredrequests;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class IgnoredrequestsApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(IgnoredrequestsApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server_jwt/src/main/java/org/javaboy/auth_server_jwt/AuthServerJwtApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.auth_server_jwt;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class AuthServerJwtApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(AuthServerJwtApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server_jdbc/src/main/java/org/javaboy/auth_server_jdbc/AuthServerJdbcApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.auth_server_jdbc;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class AuthServerJdbcApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(AuthServerJdbcApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2_login_demo/src/main/java/org/javaboy/oauth2_login_demo/Oauth2LoginDemoApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.oauth2_login_demo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Oauth2LoginDemoApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Oauth2LoginDemoApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter04/multi_filter_chain/src/main/java/org/javaboy/multi_filter_chain/MultiFilterChainApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.multi_filter_chain;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MultiFilterChainApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MultiFilterChainApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2/auth_server_redis/src/main/java/org/javaboy/auth_server_redis/AuthServerRedisApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.auth_server_redis;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class AuthServerRedisApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(AuthServerRedisApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2_login_demo2/src/main/java/org/javaboy/oauth2_login_demo2/Oauth2LoginDemo2Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.oauth2_login_demo2;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Oauth2LoginDemo2Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Oauth2LoginDemo2Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter15/oauth2_login_demo3/src/main/java/org/javaboy/oauth2_login_demo3/Oauth2LoginDemo3Application.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.oauth2_login_demo3;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Oauth2LoginDemo3Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Oauth2LoginDemo3Application.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter02/mybatis/src/main/java/org/javaboy/formlogin/FormloginApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.mybatis.spring.annotation.MapperScan;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 |
7 | @SpringBootApplication
8 | public class FormloginApplication {
9 |
10 | public static void main(String[] args) {
11 | SpringApplication.run(FormloginApplication.class, args);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/chapter03/multiuser-mybatis/src/main/java/org/javaboy/formlogin/FormloginApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin;
2 |
3 | import org.mybatis.spring.annotation.MapperScan;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 |
7 | @SpringBootApplication
8 | public class FormloginApplication {
9 |
10 | public static void main(String[] args) {
11 | SpringApplication.run(FormloginApplication.class, args);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/chapter04/objectpostprocessor/src/main/java/org/javaboy/objectpostprocessor/ObjectpostprocessorApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.objectpostprocessor;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ObjectpostprocessorApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ObjectpostprocessorApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/http_response_headers/src/main/java/org/javaboy/http_response_headers/HttpResponseHeadersApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.http_response_headers;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class HttpResponseHeadersApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(HttpResponseHeadersApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter09/synchronizer_token_pattern/src/main/java/org/javaboy/synchronizer_token_pattern/SynchronizerTokenPatternApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.synchronizer_token_pattern;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class SynchronizerTokenPatternApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(SynchronizerTokenPatternApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter06/rememberme_persistent/security06.sql:
--------------------------------------------------------------------------------
1 | CREATE DATABASE IF NOT EXISTS security06 COLLATE utf8mb4_unicode_ci;
2 |
3 | USE security06;
4 |
5 | CREATE TABLE `persistent_logins` (
6 | `username` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
7 | `series` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
8 | `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
9 | `last_used` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
10 | PRIMARY KEY (`series`)
11 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--------------------------------------------------------------------------------
/chapter12/exception_translation_filter/src/main/java/org/javaboy/exception_translation_filter/ExceptionTranslationFilterApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.exception_translation_filter;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ExceptionTranslationFilterApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ExceptionTranslationFilterApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/chapter05/passwordencoder/src/main/java/org/javaboy/passwordencoder/PasswordencoderApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.passwordencoder;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.security.crypto.password.PasswordEncoder;
6 |
7 | @SpringBootApplication
8 | public class PasswordencoderApplication {
9 |
10 | public static void main(String[] args) {
11 | SpringApplication.run(PasswordencoderApplication.class, args);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/chapter05/passwordencoder02/src/main/java/org/javaboy/passwordencoder/PasswordencoderApplication.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.passwordencoder;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.security.crypto.password.PasswordEncoder;
6 |
7 | @SpringBootApplication
8 | public class PasswordencoderApplication {
9 |
10 | public static void main(String[] args) {
11 | SpringApplication.run(PasswordencoderApplication.class, args);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/chapter02/jpa/src/main/java/org/javaboy/formlogin/mapper/UserDao.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.formlogin.mapper;
2 |
3 | import org.javaboy.formlogin.model.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | /**
7 | * @author 江南一点雨
8 | * @微信公众号 江南一点雨
9 | * @网站 http://www.itboyhub.com
10 | * @国际站 http://www.javaboy.org
11 | * @微信 a_java_boy
12 | * @GitHub https://github.com/lenve
13 | * @Gitee https://gitee.com/lenve
14 | */
15 | public interface UserDao extends JpaRepository {
16 | User findUserByUsername(String username);
17 | }
--------------------------------------------------------------------------------
/chapter13/base_on_url_dy/src/main/java/org/javaboy/base_on_url_dy/mapper/MenuMapper.java:
--------------------------------------------------------------------------------
1 | package org.javaboy.base_on_url_dy.mapper;
2 |
3 | import org.apache.ibatis.annotations.Mapper;
4 | import org.javaboy.base_on_url_dy.model.Menu;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | * @author 江南一点雨
10 | * @微信公众号 江南一点雨
11 | * @网站 http://www.itboyhub.com
12 | * @国际站 http://www.javaboy.org
13 | * @微信 a_java_boy
14 | * @GitHub https://github.com/lenve
15 | * @Gitee https://gitee.com/lenve
16 | */
17 | @Mapper
18 | public interface MenuMapper {
19 | List