Posts
UML Artifacts for the Java Developer
The Gurus for this field are: Scot Abmler Martin Fowler Robert Martin
Useful resources: https://agilemodeling.com/ https://agilemodeling.com/essays/modelingtechniques.htm https://agilemodeling.com/artifacts/ https://agilemodeling.com/style/ Relationships Inheritance, Composition, Aggregation https://agilemodeling.com/artifacts/classdiagram.htm https://agilemodeling.com/style/classdiagram.htm https://agilemodeling.com/artifacts/sequencediagram.htm https://agilemodeling.com/style/sequencediagram.htm https://agilemodeling.com/style/statechartdiagram.htm https://agilemodeling.com/artifacts/usecasediagram.htm https://agilemodeling.com/style/usecasediagram.htm \
Other resources https://www.ibm.com/docs/en/dma?topic=diagrams-artifacts https://www.uml-diagrams.org/artifact.html \
Posts
Java Coding Challange
Write Program in Java to create threads using the Runnable interface public class RunnableInterface implements Runnable { //Declaring a count variable private int count; //run() method this method tells what the thread will do public void run() { for (int i = 1; i <= 5; i++) { System.out.println("Ninja " + count + " count: " + i); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } } //Setter for count variable public void setCount(int count) { this.
Posts
Installing Postman
Postman is needed to send requests using GET POST PUT and DELETE Methods to REST APIs for testing. Get Postman here : https://www.postman.com/downloads/
Click on the button for your Operating System Windows or Linux
Creating a Workspace This is where you keep all your collections of requests for testing your project APIs
To create the Workspace:
click on new button on to of left Navigator in popup click on Workspace select Blank Workspace click on next button give the collection a name give this collection a description select personal radio button click the Create button Creating a Collection This is used to keep all your test Requests
Posts
Implementing Full CRUD in SpringBoot Microservices
In the previous two lessons, first we created our Spring Boot Microservice, Then we installed mariaDB and implemented a rudimentary CRUD with just GET methods.
Now we are going to implement the full CRUD (Create, Read, Update, and Delete) using the following HTTP Requests (GET, POST, DELETE, and PUT) after that we are going to install Postman and use this to create Requests to test all our CRUD functionality.
Read the JavaDocs We have provided JavaDoc Comments for all the Classes and Methods that we are now going to change to explain how they work.
Posts
Configuring Database for SpringBoot Microservice
Install Maria DB Follow these instructions: http://rino.kozow.com/java/posts/install-mariadb/
Adding the todo table login as root
sudo mariadb -u root -p # OR sudo mariadb -u root -p'YourRootPassword' create database todolist; use todolist; exit To add all the needed dependencies to POM file Edit pom file and replace from the dependencies and the bottom of the POM file with this:
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.
Posts
Install MariaDB
Windows Installation Download the latest version of MariaDB here: https://mariadb.org/download/?t=mariadb&p=mariadb&r=11.2.0&os=windows&cpu=x86_64&pkg=msi&m=xtom_fre
Do not select the Alpha versions Select the Operating System as : Windows Select the Architecture as : X86_64 Select package type as : MSI package Now download and install the MSI file It is prefered to run this as a service this will allow you to enable or disable this whan restarting windows
Ubuntu Linux Installation Step 1 — Installing MariaDB First Update your Linux
Posts
Create Spring Boot Microservices
Step 1 Launch the STS IDE
Open the File menu
Click on Switch Workspace
Now navigate to your project folder
Create a new SpringBoot Microservice Open the File Menu
click on New
In the Drop-down click on Spring Starter Project
Give the project a suitable name: ManagedToDoList
Select type as Maven Select the Java JDK version as 11 Make the group : com.springboot.nico Make the artefact : todolist Make the package : com.
Posts
Installing Java Open JDK 11
Windows Installation Download the Java JDK 11 from Redhat:
https://developers.redhat.com/products/openjdk/download https://developers.redhat.com/content-gateway/file/openjdk/11.0.19/java-11-openjdk-11.0.19.7-1.windows.redhat.x86_64.msi
While installing the Open JDK save the path to notepad we will need to create an environ variable for this
Linux installation linux download:
chown nickm: /opt cd /opt wget https://developers.redhat.com/content-gateway/file/openjdk/11.0.19/java-11-openjdk-11.0.19.0.7-1.portable.jdk.el.x86_64.tar.xz Open browser to : https://developers.redhat.com/products/openjdk/download download java-11-openjdk-11.0.19.0.7-1.portable.jdk.el.x86_64.tar.xz