Saturday 27 July 2019

Changing the embedded tomcat server in spring boot application?

How to Change the Embedded tomcat server with other embedded Server (Jetty or Undertow) in spring boot application?

I got this question many times and want to provide answer here:

To change the tomcat server with Undertow, replace the following dependencies:

1. Remove the spring-boot-starter-web dependency from pom.xml
   
     <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
     </dependency>

2. Add the following dependencies

Here we will exclude the spring-boot-starter-tomcat dependency from spring-boot starter-web

    <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
                      <exclusions>
                            <exclusion>
                                <groupId>org.springframework.boot</groupId>
                                <artifactId>spring-boot-starter-tomcat</artifactId>
                           </exclusion>
                     </exclusions>
                    </dependency>
      <dependency>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter-undertow</artifactId>
      </dependency>

Now Run the application and check the console output, you will see: Undertow started on port(s) 8080: (In my case, it is default port, you can also change the port in application.properties file).

Screenshot:


Undertow Screenshot




To change the tomcat server with Jetty, replace the following dependencies:

1. Remove the spring-boot-starter-web dependency from pom.xml
   
     <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
     </dependency>

2. Add the following dependencies

<dependency>
           <groupId>org.springframework.boot</groupId>
           <artifactId>spring-boot-starter-web</artifactId>
                  <exclusions>
                        <exclusion>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-starter-tomcat</artifactId>
                        </exclusion>
                  </exclusions>
</dependency>


<dependency>
<groupId>org.springframework.boot</groupId>
           <artifactId>spring-boot-starter-jetty</artifactId>
</dependency>

Now Run the application and check the console output, you will see: Jetty started on port(s) 8089 (Port which you have set for server, default port 8080).

Jetty output:





Thursday 27 June 2019

Top 5 computer science fields

When it comes to the subjects or majors, the STEM fields are always the preferred ones. One field that clearly stands out in terms of popularity among international students is MS in Computer Science in USA. In this post we will look into the 5 hottest computer science fields.
While applying for MS in Computer Science, you need to consider a variety of factors for making a well-informed decision. There are round about 4,000 colleges and universities in the US. 30 to 40 US universities are among the top 100 ranked world universities (QS and Times Higher Education rankings). Selecting and getting admitted, in the right university and specialization, will determine your success in the future.
1. Artificial Intelligence (AI):
A field of computer science emphasizes on the creation of intelligence machine that act like humans. Artificial Intelligence has become an essential part of the technology industry. due the modern era of technological world, where everything are automated is keeping AI at the top in the various fields of computer science.
2. Machine Learning (ML):
Machine Learning is an application of Artificial Intelligence that allow systems the ability to automatically learn and refine from experience without being directly programmed. All the system in which some sort of predictions or calculations are made, contains the application of Machine Learning.
3. Data Science & Analytics:
In short terms Data Science is the study of data. Data Science is more related to the methods of Recording, Sorting and Analyzing data. Big data coupled with data analytics can help businesses to optimize operational efficiency, calculate entire risk portfolios, investigate the underlying causes of failures, and understanding consumer behavior in minutes.
4. Robotics:
Robotics deals with the conception, design, construction and operation of robots. This field really make revolutions in 21th century by replacing humans and performing a variety of tedious and hazardous tasks.
5. Cyber Security:
Cyber Security is the technique of protecting, computers, server, electronic systems networks and confidential data from the damage, unauthorized access and malicious attacks. In this technological modern world where every person has some sort of confidential and financial details on the Internet, increase the importance of this field one-forth.

JDK installation guide

First of all you will need to download the JDK(Java Development Kit) according to your operating system. Visit the official oracle website url: and choose the jdk according to your Operating System. For the windows users the installation process is pretty much state forward. Just double clicking on the jdk file you have downloaded from the url mentioned above and then clicking next, next... will do that. For Linux user there are many ways to install JDK but I will proceed through Terminal: The whole installation process can be done by running just two commands. Open terminal (ctrl Alt T) and run the following command. 1. Add the PPA (Personal Package Archives): sudo add-apt-repository ppa:webupd8team/java 2. Install the JDK: run the following command to install jdk: sudo apt install oracle-java8-installer When the command complete then just type javac -version to see the java compiler version. Thank you.

Thursday 20 June 2019

Reasons people quit their job


Good people never work just for the money, They want to be happy to come to work every day. They want to be surrounded by nice people just like themselves. No amount of money is worth, while the toxic work culture, lack of integrity, lake of respect, lake of support, lake of trust make you annoy, sick and feel miserable. Naturally it is a mindset of every human being not to compromise on their health while working for some amount of money.


Lake of growth in opportunities:

It is human nature to grow, and from the beginning since we were little. Some of us are growing up and many are growing out. The growing may be, of our body or of our mind, but naturally we want to become bigger than we are.
While our physical growth slows over time, though, our desire for development never goes away.”
It is known that employees will be more productive at their duty if they know he/she can grow, rather than stick to constant head hitting.




Dis-honesty and lake of Morality:

Employees are the pillars of any organization, if there is no employee then there is no organization. Unfortunately organizations forgot the values of a pillar in a building. Organizations treat their employees like they are their slaves and forget the main point that their organization is running, have a unique status on their employees efforts.


People are get blamed for their boss’s mistakes:

Great leaders and great organizations never give a chance to mistake, they think 100 times even more to take a decision. In our high-litigation society someone else who is a little rank less, are get blamed.
True leaders pull the thumb, before they point the finger
True leader get advantage of every misstep. They turn every misstep to and opportunity to learn from it, instead of pointing fingers. True Leaders pass the good well and take the blame.


Toxic work-culture:

Every human being are more productive in a human friendly environment. Every employee want to spend more energy in achieving a unique status for the organization, but when organization deal employees like commodities then they will of course search for some alternate and this alternate may be in the sense of quit.


Hard-work, loyalty and talents are not appreciated:

Every human being have a thirst of appreciation and become more productive when their efforts get appreciation.


x