Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.36</version>
Copy link

@coderabbitai coderabbitai bot Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟑 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check latest Lombok version from Maven Central
echo "=== Latest Lombok Version ==="
curl -s 'https://search.maven.org/solrsearch/select?q=g:org.projectlombok+AND+a:lombok&rows=1&wt=json' | jq -r '.response.docs[0].latestVersion'

# Check for security advisories via GitHub
echo "=== Security Advisories ==="
gh api graphql -f query='
{
  securityVulnerabilities(first: 10, ecosystem: MAVEN, package: "org.projectlombok:lombok") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
      firstPatchedVersion {
        identifier
      }
    }
  }
}' 2>&1 || echo "GitHub GraphQL query failed or no vulnerabilities found"

Repository: PSMRI/AMRIT-DB

Length of output: 173


Update Lombok to version 1.18.38.

Version 1.18.36 is two minor versions behind the latest available version (1.18.38). No security vulnerabilities were found for the current version, but upgrading to 1.18.38 is recommended to maintain currency with the latest stable release.

πŸ€– Prompt for AI Agents
In pom.xml around line 55, the Lombok dependency version is pinned to 1.18.36;
update the <version> element to 1.18.38 to bring the dependency to the latest
stable release, then rebuild (mvn clean verify or mvn -U) to refresh the
dependency cache and ensure the project compiles with the new Lombok version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

<optional>false</optional>
</dependency>
<dependency>
Expand Down
73 changes: 38 additions & 35 deletions src/main/java/com/db/piramalswasthya/config/FlywayConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,49 @@
import javax.sql.DataSource;

import org.flywaydb.core.Flyway;
import org.flywaydb.core.api.configuration.FluentConfiguration;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FlywayConfig {
@Bean
public Flyway flywayDbiemr(@Qualifier("dbiemrDataSource") DataSource dataSource) {
return Flyway.configure()
.dataSource(dataSource)
.locations("classpath:db/migration/dbiemr")
.baselineOnMigrate(true)
.load();
}

@Bean
public Flyway flywayDbidentity(@Qualifier("dbidentityDataSource") DataSource dataSource) {
return Flyway.configure()
.dataSource(dataSource)
.locations("classpath:db/migration/dbidentity")
.baselineOnMigrate(true)
.load();
}

@Bean
public Flyway flywayDbreporting(@Qualifier("dbreportingDataSource") DataSource dataSource) {
return Flyway.configure()
.dataSource(dataSource)
.locations("classpath:db/migration/dbreporting")
.baselineOnMigrate(true)
.load();
}

@Bean
public Flyway flywayDb1097identity(@Qualifier("db1097identityDataSource") DataSource dataSource) {
return Flyway.configure()
.dataSource(dataSource)
.locations("classpath:db/migration/db1097identity")
.baselineOnMigrate(true)
.load();
}

@Value("${amrit.flyway.ignore-applied-migration-checksum:false}")
private boolean ignoreAppliedMigrationChecksum;

private Flyway createFlyway(DataSource dataSource, String location) {
FluentConfiguration configuration = Flyway.configure()
.dataSource(dataSource)
.locations(location)
.baselineOnMigrate(true);

if (ignoreAppliedMigrationChecksum) {
configuration.ignoreMigrationPatterns("*:applied");
}

return configuration.load();
}

@Bean
public Flyway flywayDbiemr(@Qualifier("dbiemrDataSource") DataSource dataSource) {
return createFlyway(dataSource, "classpath:db/migration/dbiemr");
}

@Bean
public Flyway flywayDbidentity(@Qualifier("dbidentityDataSource") DataSource dataSource) {
return createFlyway(dataSource, "classpath:db/migration/dbidentity");
}

@Bean
public Flyway flywayDbreporting(@Qualifier("dbreportingDataSource") DataSource dataSource) {
return createFlyway(dataSource, "classpath:db/migration/dbreporting");
}

@Bean
public Flyway flywayDb1097identity(@Qualifier("db1097identityDataSource") DataSource dataSource) {
return createFlyway(dataSource, "classpath:db/migration/db1097identity");
}

}
21 changes: 21 additions & 0 deletions src/main/resources/application-local.properties
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We manage environments with property files in environments folder.
This file should not be committed.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
spring.datasource.dbiemr.url=jdbc:mysql://localhost:3306/dbiemr
spring.datasource.dbiemr.username=user
spring.datasource.dbiemr.password=password
spring.datasource.dbiemr.driver-class-name=com.mysql.cj.jdbc.Driver

spring.datasource.dbidentity.url=jdbc:mysql://localhost:3306/dbidentity
spring.datasource.dbidentity.username=user
spring.datasource.dbidentity.password=password
spring.datasource.dbidentity.driver-class-name=com.mysql.cj.jdbc.Driver

spring.datasource.dbreporting.url=jdbc:mysql://localhost:3306/dbreporting
spring.datasource.dbreporting.username=user
spring.datasource.dbreporting.password=password
spring.datasource.dbreporting.driver-class-name=com.mysql.cj.jdbc.Driver

spring.datasource.db1097identity.url=jdbc:mysql://localhost:3306/db1097identity
spring.datasource.db1097identity.username=user
spring.datasource.db1097identity.password=password
spring.datasource.db1097identity.driver-class-name=com.mysql.cj.jdbc.Driver

amrit.flyway.ignore-applied-migration-checksum=true
2 changes: 2 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ spring.datasource.db1097identity.password=<Enter your AMRIT DB_1097_IDENTITY pas
spring.datasource.db1097identity.driver-class-name=com.mysql.cj.jdbc.Driver



amrit.flyway.ignore-applied-migration-checksum=false