Multithreading in Java and Spring Boot
1. Creating Threads in Java 1.1 Extending the Thread Class public class MyThread extends Thread { public void run() { // Code to be executed in the new thread for (int i = 0; i Read more…
A JOIN
clause is used to combine rows from two or more tables, based on a related column between them.
There are four types of join in MySQL:
INNER JOIN
: Returns records that have matching values in both tablesLEFT JOIN
: Returns all records from the left table, and the matched records from the right tableRIGHT JOIN
: Returns all records from the right table, and the matched records from the left tableCROSS JOIN
: Returns all records from both tablesExample:
SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID;
1. Creating Threads in Java 1.1 Extending the Thread Class public class MyThread extends Thread { public void run() { // Code to be executed in the new thread for (int i = 0; i Read more…
Set up dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> Configuring JPA and Hibernate in application.properties file spring.datasource.url=jdbc:mysql://localhost:3306/dbname spring.datasource.username=root spring.datasource.password=password spring.jpa.hibernate.ddl-auto=update or application.yml spring: application: name: demoapp datasource: url: jdbc:mysql://localhost:3306/dbname username: root password: password driver-class-name: com.mysql.cj.jdbc.Driver jpa: hibernate: Read more…
DockerFile Reference: https://docs.docker.com/reference/dockerfile/ Best practices for Dockerfile instructions: https://docs.docker.com/develop/develop-images/instructions/
0 Comments