https://www.sivalabs.in/spring-ai-rag-using-embedding-models-vector-databases/
https://piotrminkowski.com/2025/02/24/using-rag-and-vector-store-with-spring-ai/
Below are the steps to run Sonar o Maven based Java Project
1. Install SonarQube server
2. Add below pluin dependency in application pom.xml:
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.0.1746</version>
</plugin>
3. In case you app running on JDK 8 & SonarQube on different JDK, then do the maven clean install in JDK8 & run sonar command in JDK 17
(e.g. export JAVA_HOME=/<Corretto Path>/corretto-17 before running sonar command)
4. Add below plugin in pom.xml to get dependency check report
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>8.4.0</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<formats>
<format>XML</format>
<format>JSON</format>
<format>HTML</format>
</formats>
<!--<outputDirectory>${project.build.directory}/dependency-check-report</outputDirectory>-->
</configuration>
</plugin>
5. Run below command
mvn sonar:sonar -Dsonar.token=<sonar_token> -Dsonar.scm.disabled=true -Dsonar.projectKey=<project key name> -Dsonar.dependencyCheck.reportPath=target/dependency-check-report.xml -Dsonar.dependencyCheck.jsonReportPath=target/dependency-check-report.json -Dsonar.dependencyCheck.htmlReportPath=target/dependency-check-report.html
N.B. OWASP Dependency Check Plugin can be integrated to Sonar Server from Sonar Marketplace. Sonar Marketplace is visible from Admin section of the SonarQube server installed in your system.
First run below command from terminal
sudo apt-get install python3-configobj python3-gtkspellcheck python3-svn subversion python3-dulwich python3-pygments git meld python3-tk
Install RabbitVCS with Nautilus support:
sudo apt install rabbitvcs-nautilus
Restart Nautilus:
nautilus -q
For Thunar (XFCE):
sudo apt install rabbitvcs-thunar
Then restart Thunar:
thunar -q
For Caja (MATE):
sudo apt install rabbitvcs-caja
Scheduling Distributed Jobs with JobRunr in Java
In modern application development, scheduling jobs in a distributed and scalable manner is a critical requirement. JobRunr, a modern framework for job scheduling, provides an elegant and powerful solution for scheduling background jobs in a distributed pattern using Java.
In this blog, we’ll walk through a simple use case to demonstrate how you can schedule a job to run after a specified time using JobRunr.
Setting Up JobRunr
To get started, include the necessary dependencies in your pom.xml file. Below are the Maven dependencies required for JobRunr and its integration with Jackson for serialization.
<dependency>
<groupId>org.jobrunr</groupId>
<artifactId>jobrunr</artifactId>
<version>7.3.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.11.1</version>
</dependency>
Example Use Case: Scheduling a Delayed Job
In this example, we’ll configure JobRunr to schedule a job that executes after a 60-second delay. The job will simply print a message to the console.
Here’s the sample code:
import org.jobrunr.configuration.JobRunr;
import org.jobrunr.scheduling.JobScheduler;
import org.jobrunr.storage.InMemoryStorageProvider;
import java.time.Instant;
public class JobRunrExample {
public static void main(String[] args) {
// Configure JobRunr with an in-memory storage provider
JobScheduler jobScheduler = JobRunr.configure()
.useStorageProvider(new InMemoryStorageProvider())
.useBackgroundJobServer()
.initialize()
.getJobScheduler();
// Schedule a job to run after 60 seconds
jobScheduler.schedule(Instant.now().plusSeconds(60),
() -> System.out.println("Hello!"));
}
}
Explanation
Conclusion
JobRunr simplifies the process of scheduling background tasks in Java applications, making it a great choice for distributed systems. This framework not only supports delayed job execution but also offers features like retry mechanisms, distributed execution, and integration with popular storage solutions.
https://spring.io/blog/2024/09/26/ai-meets-spring-petclinic-implementing-an-ai-assistant-with-spring-ai-part-i https://www.sivalabs.in/sprin...