Posts

Showing posts from May, 2017

Java Recent Interview questions

Core Java when you use the wait() method? Difference between wait and sleep method? What is hashcode() method in object ? why we are using ? What is Hash Collision? Why we override the hashcode() method when we override the equals()? Why we go for concurrent collection?, what are they? What are the concurrent collection used in your project? What is concurrentHashMap? How it is different from Collection.SynchronizedHashMap()? HashMap vs ConCurrentHashMap? What is atomic operation? Difference between synchronized vs lock? What is Thread life cycle? What are feature are available in Jdk 7/8 How to find the memory leak in java? What is annotation? How to create a custom annotation? What is the use of Future ? What is the callable method in Thread? Develop a program for ConnectionPool ? What are the way to sort the element in Java? Comparable, Comparator Design Pattern What are the Design Pattern used? Singleton, Factory, Abstract Factory, Strategy, Façade, Protot

Spring Boot Part-2

Image
  Note: Understand the current blog(Spring Boot-2) . Please walk through the previous blog-Spring Boot-1 Implement the update the delete operations in Spring Boot Add a update method in service   Write the delete the service a)    Write a delete method in the controller Write delete method in the service class     Spring Data JPA: The Data Tire Java Persistence API - specification of ORM. Object - Releational Mapping - SQL db (Relational DB) Entity class map to table. You don't need to query in the db.   Spring Data JPA - working with ORM tool. To connect to db.     Create a new Project for SPRING JPA New Spring Starter Project in STS Name: course-api-data Type: Maven Project Java version: 1.8 Package: Jar Language:Java Group: io.javabrains artifact:course-api-data Description: Coursse API WITH data for Spring Boot Quick start Package:io.javabrains Click Next Select the Dependencies Web -> Web SQL -> JPA (SPRIN

Spring Boot Part-1

Image
  What is Spring Boot?   Spring boot makes it easy to create stand-alone , production grade spring based application that you can "just run". ..create...Spring based Applications... What is Spring? Application framework - built entreprise java application. Programming and configuration model - focus on business logic and rest spring will take care. datalayer, service, controller, mvc address using annotation. Problems with Spring Huge framework - Address all the issue but its overlapping. Multiple setup steps - connect to the db. needs lot of configuration is need Multiple configuration steps Multiple build and deploy steps - cost is involved. Can we abstract these steps? You can focus on business logic that is 80% and rest of the 20% configuration part. That we will configure depends on the environment .   Enter Spring Boot Opinionated - Start with your basic configuration and later you can change as per your wish. If required. C