HowToDoInJava https://howtodoinjava.com Wed, 07 Feb 2018 19:26:10 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.4 https://howtodoinjava.com/wp-content/uploads/2015/05/howtodoinjava_logo-55696c1cv1_site_icon-32x32.png HowToDoInJava https://howtodoinjava.com 32 32 How to read typesafe user input using Scanner class https://howtodoinjava.com/core-java/io/read-typesafe-input-scanner-class/ https://howtodoinjava.com/core-java/io/read-typesafe-input-scanner-class/#respond Wed, 07 Feb 2018 19:26:10 +0000 https://howtodoinjava.com/?p=9887 Learn to read typesafe user inputs from console in any interactive java application i.e. prompt the user until user inputs the value in correct format/datatype.

The post How to read typesafe user input using Scanner class appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/core-java/io/read-typesafe-input-scanner-class/feed/ 0
Correct way to compare floats or doubles in Java https://howtodoinjava.com/core-java/basics/correct-way-compare-floats-doubles-java/ https://howtodoinjava.com/core-java/basics/correct-way-compare-floats-doubles-java/#comments Wed, 07 Feb 2018 11:23:12 +0000 https://howtodoinjava.com/?p=9883 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.

The post Correct way to compare floats or doubles in Java appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/core-java/basics/correct-way-compare-floats-doubles-java/feed/ 1
Spring Bean Eager vs Lazy Initialization Configurations https://howtodoinjava.com/spring5/core/spring-bean-eager-vs-lazy-init/ https://howtodoinjava.com/spring5/core/spring-bean-eager-vs-lazy-init/#respond Wed, 03 Jan 2018 12:19:38 +0000 https://howtodoinjava.com/?p=9872 By default, Spring bean factory 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 […]

The post Spring Bean Eager vs Lazy Initialization Configurations appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring5/core/spring-bean-eager-vs-lazy-init/feed/ 0
Spring Bean Container Java Configuration Example https://howtodoinjava.com/spring5/core/spring-bean-container-java-configuration-example/ https://howtodoinjava.com/spring5/core/spring-bean-container-java-configuration-example/#respond Tue, 02 Jan 2018 12:02:03 +0000 https://howtodoinjava.com/?p=9864 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 […]

The post Spring Bean Container Java Configuration Example appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring5/core/spring-bean-container-java-configuration-example/feed/ 0
Spring ApplicationContext XML Configuration Example https://howtodoinjava.com/spring5/core/applicationcontext-xml-config-example/ https://howtodoinjava.com/spring5/core/applicationcontext-xml-config-example/#comments Tue, 02 Jan 2018 10:01:33 +0000 https://howtodoinjava.com/?p=9857 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 […]

The post Spring ApplicationContext XML Configuration Example appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring5/core/applicationcontext-xml-config-example/feed/ 1
Amazon Alexa Custom Skill Tutorial https://howtodoinjava.com/aws/amazon-alexa-custom-skill-tutorial/ https://howtodoinjava.com/aws/amazon-alexa-custom-skill-tutorial/#respond Sun, 05 Nov 2017 19:05:13 +0000 https://howtodoinjava.com/?p=9811 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.

The post Amazon Alexa Custom Skill Tutorial appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/aws/amazon-alexa-custom-skill-tutorial/feed/ 0
Spring Bean Scopes https://howtodoinjava.com/spring5/core/spring-bean-scopes-tutorial/ https://howtodoinjava.com/spring5/core/spring-bean-scopes-tutorial/#respond Sat, 04 Nov 2017 17:47:15 +0000 https://howtodoinjava.com/?p=9804 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.

The post Spring Bean Scopes appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring5/core/spring-bean-scopes-tutorial/feed/ 0
Spring Boot Actuator Endpoints Example https://howtodoinjava.com/spring/spring-boot/actuator-endpoints-example/ https://howtodoinjava.com/spring/spring-boot/actuator-endpoints-example/#respond Sun, 29 Oct 2017 07:38:21 +0000 https://howtodoinjava.com/?p=9761 In this Spring boot actuator tutorial, learn about inbuilt HTTP endpoints available to any boot application for different monitoring and management purpose.

The post Spring Boot Actuator Endpoints Example appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring/spring-boot/actuator-endpoints-example/feed/ 0
Spring SOAP Client Example with WebServiceTemplate https://howtodoinjava.com/spring/spring-boot/spring-soap-client-webservicetemplate/ https://howtodoinjava.com/spring/spring-boot/spring-soap-client-webservicetemplate/#comments Sat, 21 Oct 2017 16:32:10 +0000 https://howtodoinjava.com/?p=9714 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.

The post Spring SOAP Client Example with WebServiceTemplate appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring/spring-boot/spring-soap-client-webservicetemplate/feed/ 3
Spring boot RSS feed with rome https://howtodoinjava.com/spring/spring-boot/spring-boot-rome-rss-and-atom-feed/ https://howtodoinjava.com/spring/spring-boot/spring-boot-rome-rss-and-atom-feed/#respond Fri, 20 Oct 2017 19:50:13 +0000 https://howtodoinjava.com/?p=9732 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 […]

The post Spring boot RSS feed with rome appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring/spring-boot/spring-boot-rome-rss-and-atom-feed/feed/ 0
Spring CORS Configuration Examples https://howtodoinjava.com/spring5/webmvc/spring-mvc-cors-configuration/ https://howtodoinjava.com/spring5/webmvc/spring-mvc-cors-configuration/#comments Sat, 07 Oct 2017 19:09:41 +0000 https://howtodoinjava.com/?p=9703 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.

The post Spring CORS Configuration Examples appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring5/webmvc/spring-mvc-cors-configuration/feed/ 1
Spring Boot – SOAP Webservice Example https://howtodoinjava.com/spring/spring-boot/spring-boot-soap-webservice-example/ https://howtodoinjava.com/spring/spring-boot/spring-boot-soap-webservice-example/#comments Fri, 06 Oct 2017 04:23:48 +0000 https://howtodoinjava.com/?p=9680 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.

The post Spring Boot – SOAP Webservice Example appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring/spring-boot/spring-boot-soap-webservice-example/feed/ 1
Tomcat maven plugin example https://howtodoinjava.com/maven/tomcat-maven-plugin-example/ https://howtodoinjava.com/maven/tomcat-maven-plugin-example/#respond Tue, 03 Oct 2017 19:26:16 +0000 https://howtodoinjava.com/?p=9677 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.

The post Tomcat maven plugin example appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/maven/tomcat-maven-plugin-example/feed/ 0
Spring @Controller, @GetMapping and @PostMapping Example https://howtodoinjava.com/spring5/webmvc/controller-getmapping-postmapping/ https://howtodoinjava.com/spring5/webmvc/controller-getmapping-postmapping/#comments Mon, 02 Oct 2017 18:56:50 +0000 https://howtodoinjava.com/?p=9671 Learn to create Spring MVC controllers and map requests with request mapping annotations e.g. @RequestMapping, @GetMapping, @PostMapping, @PutMapping, @DeleteMapping and @PatchMapping.

The post Spring @Controller, @GetMapping and @PostMapping Example appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring5/webmvc/controller-getmapping-postmapping/feed/ 1
Spring DispatcherServlet Tutorial with Examples https://howtodoinjava.com/spring5/webmvc/spring-dispatcherservlet-tutorial/ https://howtodoinjava.com/spring5/webmvc/spring-dispatcherservlet-tutorial/#respond Sun, 01 Oct 2017 18:46:04 +0000 https://howtodoinjava.com/?p=9659 In this tutorial, we will learn about Spring’s DispatcherServlet class, it’s responsibilities and how to configure it with examples.

The post Spring DispatcherServlet Tutorial with Examples appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring5/webmvc/spring-dispatcherservlet-tutorial/feed/ 0
Spring 5 MVC + Hibernate 5 Example https://howtodoinjava.com/spring5/webmvc/spring5-mvc-hibernate5-example/ https://howtodoinjava.com/spring5/webmvc/spring5-mvc-hibernate5-example/#comments Sun, 01 Oct 2017 08:51:20 +0000 https://howtodoinjava.com/?p=9651 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.

The post Spring 5 MVC + Hibernate 5 Example appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring5/webmvc/spring5-mvc-hibernate5-example/feed/ 3
Spring Boot SSL [https] Example https://howtodoinjava.com/spring/spring-boot/spring-boot-ssl-https-example/ https://howtodoinjava.com/spring/spring-boot/spring-boot-ssl-https-example/#comments Mon, 25 Sep 2017 18:40:08 +0000 https://howtodoinjava.com/?p=9623 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.

The post Spring Boot SSL [https] Example appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/spring/spring-boot/spring-boot-ssl-https-example/feed/ 1
Java Stream of Random Numbers in Range https://howtodoinjava.com/java-8/stream-random-numbers-range/ https://howtodoinjava.com/java-8/stream-random-numbers-range/#respond Sat, 16 Sep 2017 19:35:16 +0000 https://howtodoinjava.com/?p=9618 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.

The post Java Stream of Random Numbers in Range appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/java-8/stream-random-numbers-range/feed/ 0
Java Chatbot Example using AIML Library https://howtodoinjava.com/ai/java-aiml-chatbot-example/ https://howtodoinjava.com/ai/java-aiml-chatbot-example/#comments Sat, 16 Sep 2017 12:17:53 +0000 https://howtodoinjava.com/?p=9599 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.

The post Java Chatbot Example using AIML Library appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/ai/java-aiml-chatbot-example/feed/ 4
Java Stream Max and Min Examples https://howtodoinjava.com/java-8/stream-max-min-examples/ https://howtodoinjava.com/java-8/stream-max-min-examples/#comments Wed, 13 Sep 2017 17:42:23 +0000 https://howtodoinjava.com/?p=9594 Learn to find min and max date, number, Char, String or object from stream of comparable elements in easy steps using Comparator.comparing() method.

The post Java Stream Max and Min Examples appeared first on HowToDoInJava.

]]>
https://howtodoinjava.com/java-8/stream-max-min-examples/feed/ 1