Posts

Showing posts from 2020

Java generics ? super Type and ? extends Type

Hy All, in this post, going to tell you real-time scenario when you use super and extends ? super C This indicates the lower bound, what exactly means that it can hold a list of object which is super to type C or C ? extends A This indicates the upper bound, what exactly means that it can hold a list of object which is a child to type A or A. Below is provided an example for the same, package com.vinay.stock.poc; import java.util.ArrayList; import java.util.List; /** * @author 912vi */ public class GenericDemo { public static void main(String[] args) { List<A> list = new ArrayList<>(); list.add( new A()); list.add( new B()); list.add( new C()); test2 (list); List<B> list1 = new ArrayList<>(); list1.add( new B()); list1.add( new C()); test2 (list1); /* List<AA> list2 = new ArrayList<>(); test2(list2);// compile time error because upper boun

Spring Boot App Deployment Automation Via Jenkins to Tomcat Server

Image
Table of content       Introduction       Required Technology       Create a Spring Boot Project       Push Application to Git repository       Deploy Spring Boot Project to Tomcat Container For Testing       Install Jenkins       Jenkins Setup for Maven, Java, Git, Tomcat, Email trigger.       Setup of Job For the SpringBoot App        Introduction :-  Hi All, The agenda of this post is to get basics information about how we can make our app from scratch and do the setup for the automatic deployment via Jenkins in Tomcat container, so that whenever developers do code checking into the codebase automatic build trigger and latest code get deployed to tomcat container. In this tutorial, we will see how can we develop a spring boot project from scratch,  how we can push this project to Github, what are the steps to deploy this app to stand-alone running tomcat containers. By the above steps are making sure that our application is running fine and we are a