Powered by Blogger.

Wednesday 27 December 2023

Multiples DATABASE Connection and Data shifting Using Spring Boots API

No comments :
Multiple DataBase Connection and Data shifting using Spring boot API configuration Example.
Step-by-step Write Java files.
1. application.properties File for Add multiple DataBase Connection. 
2. DBConfigDBNAME.JAVA Files for multiple DataBase Connection. 
3. Job Scheduler.java file for Auto shift programm. 
4. Entity Beans, Repository, Services Implementations for Binding and shifting Data.
  1. Create Spring Boot Java (Microservices)
      Create Spring Boot Java (Microservices).
  1. Project Name: DataShiftingConfigSpringBoots
  2. Group: DataShifting-a143mk
  3. Artifactid: DataShifting-a143mk
  4. Description: DataBase Connection and Data shifting using Spring boot API.
  5. Package: DataShiftinga143mk
Select the technologies and library(Maven Dependency ) to be.
  1. spring-boot-configuration-processor
  2. ojdbc8

while creating the project pom.xml file and some maven dependency, main class is automatically created when web add any dependency like.

pom.xml


1. Configure application.properties


Create DataBase Configuration java Files :
DBConfigDATABASE1.java


DBConfigDATABASE2.java


DBConfigDATABASE3.java

Create Scheduler ClassCreate Scheduler for Auto run Program and import some Packages Scheduler.java as below:

Have you seen the previous post? You all know how to learn and create Entity Bean, Repository, Service Implementation in the project. If you don't know about it then go to the previous post and learn it.

Friday 6 October 2023

How to add External Jar file in Pom.xml file

1 comment :
Add Externals Jar file in Pom.xml
There are many ways to configure external jar file but we are telling you an easy way, for this you should have whatever jar file you want to add, after that you know the .m2/repository folder.
Add dependencies in pom.xml and after saving the file, a folder is auto created inside the .m2/repository which is named after the groupId in dependency, such a groupId name is a143mkJar.
For Example : I have two Jar file one is EncryptDecryptA143mk-2.7.7.jar and Ldap-a143mkJar-2.7.7.jar
groupId is a143mkJar
artifactId is EncryptDecryptA143mk 
version is 2.7.7 

Add dependences in pom.xml:

Put the Jar file in maven repository Directory like this.
.m2/repository/a143mkJar/EncryptDecryptA143mk/2.7.7/EncryptDecryptA143mk-2.7.7.jar
.m2/repository/a143mkJar/Ldap-a143mkJar/2.7.7/Ldap-a143mkJar-2.7.7.jar

Tuesday 19 September 2023

How to PACKAGE Spring Boot application to JAR and WAR

No comments :
Maven is a popular build tool, that takes your project’s Java source code, compiles it, tests it and converts it into an executable Java program: either a .jar or a .war file.  
Package Spring Boot application to JAR OR WAR file:
The default packaging type of a Spring Boot project is jar if the attribute is not present in the pom.xml file. It’s better to check your project’s pom.xml file to make sure that the packaging type is jar or War:

If you use an IDE such as Eclipse or Spring Tool Suite, right-click on the project, then select Run As > Maven Configuration Like:
  • CLEAN
  • BUILD
  • INSTALL
  • PACKAGE.................etc.