HowToDoInJava

  • All Tutorials
  • Spring Boot
  • Java 8
  • Interview Questions

Correct way to compare floats or doubles in Java

February 7, 2018 by Lokesh Gupta

Using programming, we cannot change the way these floating point numbers are stored or computed. So we have to adapt a solution where we agree that a determine the differences in both values which we can tolerate and still consider the numbers equal. This agreed upon difference in values is called the threshold.

Spring Bean Eager vs Lazy Initialization Configurations

January 3, 2018 by Lokesh Gupta

By default, Spring “application context” eagerly creates and initializes all ‘singleton scoped‘ beans during application startup itself. It helps in detecting the bean configuration issues at early stage, in most of the cases. But sometimes, you may need to mark some or all beans to be lazy initialized due to different project requirements. Spring provides […]

Spring Bean Container Java Configuration Example

January 2, 2018 by Lokesh Gupta

Learn to create spring bean container using pure java configuration using annotations for any standalone application. We will learn to create it with and without scanning of component annotations and using @Bean annotations. Table of contents Create bean container with component scanning enabled Create bean container using @Bean annotation Create bean container with component scanning […]

Spring ApplicationContext XML Configuration Example

January 2, 2018 by Lokesh Gupta

In this example, we will quickly go through the steps to create Spring’s application context in any standalone application. It uses maven to manage the dependencies and eclipse to build and run the code. 1) Maven Dependencies To create application context, which is capable of creating and managing beans, we need minimum three maven dependencies […]

Amazon Alexa Custom Skill Tutorial

November 6, 2017 by Sajal Chakraborty

Alexa is Amazon’s cloud-based voice service. In this tutorial, learn to add custom skills to amazon Alexa and to use those skills in Amazon Eco device.

Spring Bean Scopes

November 4, 2017 by Lokesh Gupta

In Spring framework, you can create beans in 6 inbuilt scopes and you can also define your custom scope as well. Out of these six scopes, four are available only if you use a web-aware ApplicationContext. singleton and prototype scopes are available in any type of IOC containers.

Spring Boot Actuator Endpoints Example

October 29, 2017 by Sajal Chakraborty

In this Spring boot actuator tutorial, learn about inbuilt HTTP endpoints available to any boot application for different monitoring and management purpose.

Spring SOAP Client Example with WebServiceTemplate

October 21, 2017 by Sajal Chakraborty

Learn to consume SOAP webservices using spring’s WebServiceTemplate and auto client proxy class generation using JAXB maven plugin. Creating a SOAP webservice is out of scope of this tutorial, but you may learn it here.

Spring boot RSS feed with rome

October 21, 2017 by Sajal Chakraborty

In this tutorial, learn to create and consume RSS and Atom feed from spring boot application. You must have seen this in form of text or image buttons on various websites (like our RSS feed) inviting you to “Subscribe via RSS.” RSS is simple syndication API – often referred as Rich Site Summary. RSS revolutionized […]

Spring CORS Configuration Examples

October 8, 2017 by Lokesh Gupta

CORS helps in serving web content from multiple domains into browsers who usually have the same-origin security policy. In this example, we will learn to enable CORS support in Spring MVC application at method and global level.

Spring Boot – SOAP Webservice Example

October 6, 2017 by Sajal Chakraborty

In this spring boot soap tutorial, we will focus only in the Spring boot related configurations to see how easily we can create our contract first SOAP webservice.

Tomcat maven plugin example

October 4, 2017 by Lokesh Gupta

In this maven tutorial, learn to add and configure tomcat plugin to pom.xml and use it deploy the web application without any tomcat installation in machine.

Spring @Controller, @GetMapping and @PostMapping Example

October 3, 2017 by Lokesh Gupta

Learn to create Spring MVC controllers and map requests with request mapping annotations e.g. @RequestMapping, @GetMapping, @PostMapping, @PutMapping, @DeleteMapping and @PatchMapping.

Spring DispatcherServlet Tutorial with Examples

October 2, 2017 by Lokesh Gupta

In this tutorial, we will learn about Spring’s DispatcherServlet class, it’s responsibilities and how to configure it with examples.

Spring 5 MVC + Hibernate 5 Example

October 1, 2017 by Lokesh Gupta

In this Spring5 tutorial, learn to create Spring 5 MVC web application, handle form submission, integrate hibernate to connect to backend database and adding hibernate validator for input form fields validation.

Spring Boot SSL [https] Example

September 26, 2017 by Sajal Chakraborty

In this spring boot example, learn to configure web application to run on SSL (HTTPS) with self-signed certificate. Also learn to create SSL cert, as well.

Java Stream of Random Numbers in Range

September 17, 2017 by Lokesh Gupta

To get stream of random integers, longs or doubles within a given range – use the ints(), longs() and doubles() methods in Random and SecureRandom classes.

Java Chatbot Example using AIML Library

September 16, 2017 by Sajal Chakraborty

In this Java AIML tutorial, we will learn to create demo chatbot application using AIML and NLP application program-ab hosted on google-code repository.

Java Stream Max and Min Examples

September 13, 2017 by Lokesh Gupta

Learn to find min and max date, number, Char, String or object from stream of comparable elements in easy steps using Comparator.comparing() method.

HttpServletRequestWrapper Example to read request body 2 times

September 7, 2017 by Lokesh Gupta

My requirement was to read the HTTP request body 2 times in servlet filter and the pass the request to filter chain. HttpServletRequestWrapper helped me.

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • …
  • 40
  • Next Page »

Search Tutorials

  • Email
  • Facebook
  • RSS
  • Twitter

Recommended

  • 10 Life Lessons
  • How to Start New Blog
  • Secure Hash Algorithms
  • Regular Expressions
  • How Web Servers work?
  • How Java I/O Works Internally?
  • Best Way to Learn Java
  • Java Best Practices
  • Java Interview Questions
  • Microservices Tutorial
  • REST API Tutorial



Developer Tools

  • JSON Formatter and Minifier
  • XML Formatter and Minifier
  • CSS Formatter and Minifier
  • HTML Formatter and Minifier

Meta Links

  • Advertise
  • Contact Us
  • Privacy policy
  • About Me

References

  • Java 8 API
  • Spring Framework Reference
  • RESTEasy Reference
  • Hibernate User Guide
  • Junit Wiki
  • Maven FAQs

Copyright © 2016 · HowToDoInjava.com · All Rights Reserved. Site hosted on Bluehost

.