我的名片

网名:轻舞肥羊

职业:Java Python 架构 PM

现居:武汉

企鹅号:43131588

  • Apache HttpClient 4.5 HttpRequestRetryHandler Example

    In the following example we show how to create a custom HttpRequestRetryHandler in order to enable a custom exception recovery mechanism. When using this interface, we need to implement the retryRequest method. This allows us to define a custom retry count mechanism and exception recovery mechanism. Take a look at the following tutorial.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Apache HttpClient Cache 4.5 Http Caching Example

    HttpClient Cache provides an HTTP/1.1-compliant caching layer to be used with HttpClient–the Java equivalent of a browser cache. The following example uses the CacheConfig of the HttpClient Cache library.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Apache HttpClient 4.5 HTML FORM POST Example

    Many applications need to simulate the process of submitting an HTML form, for instance, in order to log in to a web application or submit input data. HttpClient provides the entity class UrlEncodedFormEntity to facilitate the process. The following tutorial shows how to send HTML Form parameters using apache HttpClient 4.5.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Apache HttpClient 4.5 Redirect Handling Requests Example

    HttpClient handles all types of redirects automatically, except those explicitly prohibited by the HTTP specification as requiring user intervention. See Other (status code 303) redirects on POST and PUT requests are converted to GET requests as required by the HTTP specification. One can use a custom redirect strategy to relaxe restrictions on automatic redirection of POST methods imposed by the HTTP specification. In the following tutorial we’ll us the LaxRedirectStrategy to handle http redirects.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Apache HttpClient 4.5 Custom HTTP Headers Example

    An HTTP message can contain a number of headers describing properties of the message such as content length, content type, authorization and so on. HttpClient provides methods to retrieve, add, remove and enumerate headers. In the following tutorial we’ll show how to add custom HTTP Headers to the HttpClient and Http request method.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Apache HttpClient 4.5 Multipart Upload Request Example

    In this tutorial, we demonstrate how to do a multipart upload http request using Apache HttpClient 4.5.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Spring Security + Spring LDAP Authentication Configuration Example

    Spring Security + Spring LDAP Authentication Configuration Example

    In this tutorial we demonstrate how to Configure Spring Security + Spring LDAP authentication application. We show how to configure spring security and spring LDAP using Java And XML Configuration.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Spring Boot + Spring Security + Thymeleaf Form Login Example

    Spring Boot + Spring Security + Thymeleaf Form Login Example

    This tutorial demonstrates how to configure spring-boot, spring-security and thymeleaf with form-login. We secure our web application using spring security form-login. We create a reusable Thymeleaf layout which we can use to create our secured and unsecured pages. When a user accesses a protected resource with insufficient rights we redirect the user to an access-denied page. Finally we create a login page where the user is able to login to the application. And we create a logout link.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Spring Security Basic Authentication Configuration Example

    Spring Security Basic Authentication Configuration Example

    The following tutorial is about Spring Security Basic Authentication Configuration. We demonstrate this by configuring Spring Security using both Java and XML Configuration. We create a custom authentication entry point which we can use and customize to give the user a custom login error message. We finish with showing how to write some integration tests using Spring MockMvc and JUnit.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Spring Security Method Level Annotations Example

    Spring Security Method Level Annotations Example

    This tutorial demonstrates how to use Spring Security Method Level Annotations. We can use Spring Security to secure our service layer. We can restrict which roles are able to execute a method by annotating the method with any of spring security annotations or the standard java JSR-250 annotaitons.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Spring Boot + Spring Security + Hibernate Configuration Example

    Spring Boot + Spring Security + Hibernate Configuration Example

    This tutorial demonstrates how to configure Spring Security Hibernate and Spring Boot. We secure a simple stateless web service using basic authentication. We configure Spring Security using Spring Java and/or XML Configuration. Finally, we write some JUnit Integration Tests with spring-test, h2 in-memory database and MockMvc.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Spring Security User Registration with Hibernate and Thymeleaf

    Spring Security User Registration with Hibernate and Thymeleaf

    In this example we show how to create a user registration form with Spring Security, Hibernate and Thymeleaf. We validate the user registration fields with hibernate validator annotations and a custom field matching validator to validate if the email and/or password fields match.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Spring Security Forgot Password Send Email Reset Password

    Spring Security Forgot Password Send Email Reset Password

    In this tutorial we demonstrate how to use Spring Security, Spring Boot, Hibernate and Thymeleaf to program a password reset flow by sending the user an email address to verify the reset password procedure. When a user has forgot his password, he is able to request a password reset. The application will generate a unique PasswordResetToken and store it in the database. The user’ll receive an email with the unique token. When he clicks the link, the user is redirected to a page where he can change his password.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Custom Password Constraint Validator Annotation Example

    Custom Password Constraint Validator Annotation Example

    This tutorial demonstrates how to create a custom password validator annotation using custom password rules. You’ll be able to annotate your password field with a @ValidPassword. This’ll trigger the custom PasswordConstraintValidator which’ll enforce a server-side password policy.

    轻舞肥羊2019-08-10[Java]

    阅读更多
  • Integrate Google ReCaptcha Java Spring Web Application

    Integrate Google ReCaptcha Java Spring Web Application

    This tutorial demonstrates how to integrate Google ReCaptcha into a Java Spring Web Application. reCAPTCHA is used to verify if the current computer is a human, preventing bots from automatically submitting forms. We integrated Google ReCaptcha using server side validation. We wrote a custom @ReCaptcha annotation which you can annotate your java fields. This’ll automatically handle the ReCaptcha server side validation process. At the bottom we also wrote some Unit and Integration tests using Mockito, spring-test and MockMvc.

    轻舞肥羊2019-08-10[Java]

    阅读更多

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章或者资源来源于互联网, 有时候很难判断是否侵权, 若有侵权, 请联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布无版权争议的 文章/资源.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号