# VERSION UPDATE

1. JDK : 8 -> 17
2. SPRING : 4.3 -> 5.3
3. MySql : 5.5 -> 8.4

## Here's the full migration summary

Statistics

| Metric | Count |
| -------- | -------- |
| Total Java files compared | 604 (old) vs 591 (new) |
| Pure package-rename only (no logic change) | 526 |
| Files with actual logic changes | 60 |
| Files removed | 16 (all DTO validation tests) |
| Files added | 3 (CadenceApplication x2, Home.java) |

### 1. Structure Changes

    - web.xml, hibernate.cfg.xml, persistence.xml, applicationContext.xml, servlet-context.xml, root-context.xml,
    database.properties, tiles.xml, views.xml, log4j2.xml — all removed (Spring Boot auto-configures)
    - spring-security.xml — moved from WEB-INF/spring/ to src/main/resources/, loaded via @ImportResource
    - Packaging changed: war → jar (embedded Tomcat)

### 2. Logic Changes (14 categories across 60 files)

    - Category: 4A Spring Data JPA 1.x → 2.x
    What changed: findOne → findById().orElse(null), exists → existsById, delete(id) → deleteById, PageRequest
    constructor → PageRequest.of()
    
    - Category: 4B JPQL LIKE syntax
    What changed: %:param% → CONCAT('%',:param,'%') across 5 repositories
    
    - Category: 4C Hibernate dialect
    What changed: MySQLDialect → MySQL8Dialect
    
    - Category: 4D Jackson 1.x → 2.x
    What changed: org.codehaus.jackson → com.fasterxml.jackson (3 files)
    
    - Category: 4E Apache POI
    What changed: Cell.CELL_TYPE_* constants → CellType enum
    
    - Category: 4F Entity columns
    What changed: 14 entities got columnDefinition = "LONGTEXT"
    
    - Category: 4G AES Base64
    What changed: Base64.getDecoder() → Base64.getMimeDecoder()
    
    - Category: 4H Passay library
    What changed: Rule classes updated to 1.6.x API
    
    - Category: 4I JwtUtil
    What changed: Added @Component, fixed @Value("jwt.secret") → @Value("${jwt.secret}")
    
    - Category: 4J LoginController
    What changed: Captcha decryption wrapped in try/catch with logging
    
    - Category: 4K ImsCorsFilter
    What changed: Added @Order(-101)
    
    - Category: 4L Google Base64
    What changed: Repackaged import path updated
    
    - Category: 4M Table name
    What changed: ImsIssueSecurityLevels → imsissuesecuritylevels (case)
    
    - Category: 4N Query fixes
    What changed: Stray parentheses / whitespace in 3 repository queries

### 3. Build / Config Changes

    - Parent POM now uses spring-boot-starter-parent 2.7.18
    - Java 1.8 → 17
    - MySQL connector: mysql:mysql-connector-java → com.mysql:mysql-connector-j
    - ~20 dependency versions now managed by Boot parent (explicit versions removed)
    - ddl-auto changed from update → validate

### 4. Flagged Issues to Address

    #: 1
    Issue: DB password + JWT secret in plaintext in application.properties
    Severity: Medium
    
    #: 2
    Issue: spring.main.allow-circular-references=true — circular dep exists, should be resolved
    Severity: Medium

    #: 3
    Issue: 16 DTO validation tests were dropped — zero test coverage for validation (Never copied)
    Severity: Medium
    
    #: 4
    Issue: jira-fields-mapping.xml and settings/settings.xml not carried over — verify if referenced at runtime
    Severity: Low

### 5. POM Changes

#### 1. Parent POM (ims-modules/pom.xml) — Minimal changes

    Only metadata renamed:
    
    1. groupId: com.soctronics.ims → com.divami.ims
    2. name / description: ims app builder → cadence app builder
    3. Everything else identical
    
#### 2. ims-model/pom.xml — Major changes

- Structural

    | What | Old | New |
    | -------- | -------- | -------- |
    | Parent | None | spring-boot-starter-parent 2.7.18 |
    | Java version | 1.8 | 17 |
    | groupId | com.soctronics.ims.model | com.divami.ims.model |
    | version | 1.0 | 0.0.1-SNAPSHOT |
    | dependencyManagement (spring-framework-bom) | Present | Removed (Boot parent handles) |

- Properties removed (Boot manages these now)

    hibernate.version, springsecurity.version, logback.version, org.slf4j-version, jersey.version, junit.version

- Dependencies Added

    | groupId:artifactId | Notes |
    | -------- | -------- |
    | spring-boot-starter | Core Boot starter |
    | spring-boot-starter-data-jpa | Replaces manual spring-data-jpa + hibernate |
    | spring-boot-starter-test | test scope |
    | com.mysql:mysql-connector-j | Replaces old mysql:mysql-connector-java |
    | google-http-client-apache-v2 | New HTTP transport |

- Dependencies Removed

    | groupId:artifactId | Old version | Why |
    | -------- | -------- | -------- |
    | mysql:mysql-connector-java | 8.0.33 | Replaced by com.mysql:mysql-connector-j |
    | google-collections | 1.0 | Deprecated |
    | hibernate-jpa-2.1-api | 1.0.0.Final | Boot starter-data-jpa provides |
    | commons-collections | 3.2.1 | Boot managed |
    | javax.transaction:jta | 1.1 | Boot managed |
    | velocity | 1.7 | Unused |
    | jackson-mapper-asl (codehaus) | 1.9.13 | Jackson 1.x removed |
    | spring-mock | 2.0.8 | Replaced by spring-test |

- Version Bumped (explicit versions kept)

    | Dependency | Old | New |
    | -------- | -------- | -------- |
    | org.json:json | 20160810 | 20231013 |
    | commons-beanutils | 1.9.2 | 1.9.4 |
    | commons-configuration | 1.6 | 1.10 |
    | passay | 1.0 | 1.6.4 |
    | aws-java-sdk-s3 | 1.11.160 | 1.12.529 |
    | jsch | 0.1.54 | 0.1.55 |
    | itextpdf | 5.0.6 | 5.5.13.3 |
    | pdfbox + fontbox | 2.0.2 | 2.0.29 |
    | bcprov-ext-jdk15on | 1.47 | 1.70 |
    | poi-ooxml | 3.15 | 5.2.3 |
    | hibernate-validator | 4.3.1.Final | 6.2.5.Final |
    | google-oauth-client | 1.22.0 | 1.35.0 |
    | google-http-client-jackson2 | 1.11.0-beta | 1.43.3 |

- Versions Removed (now Boot-managed) — 37 dependencies

    Including: spring-data-jpa, all log4j-*, slf4j-api, hibernate-core, hibernate-entitymanager, validation-api,
    jackson-databind, freemarker, gson, junit, commons-lang3, all jersey-*, spring-data-redis, jedis, etc.

- Plugins

    All 4 plugins (maven-compiler-plugin, maven-resources-plugin, maven-assembly-plugin, maven-surefire-plugin) kept
    but explicit versions removed. Compiler source/target: 1.8 → 17.

#### 3. ims-web/pom.xml — Major changes

- Structural

    | What | Old | New |
    | -------- | -------- | -------- |
    | Parent | None | spring-boot-starter-parent 2.7.18 |
    | Packaging | war | jar |
    | Java version | 1.8 | 17 |
    | groupId | com.soctronics | com.divami |
    | version | 1.0 | 0.0.1-SNAPSHOT |
    | dependencyManagement | Present | Removed |

- Dependencies Added

    | groupId:artifactId | Notes |
    | -------- | -------- |
    | spring-boot-starter | With spring-boot-starter-logging excluded |
    | spring-boot-starter-web | With spring-boot-starter-logging excluded |
    | spring-boot-starter-test | test scope |
    | com.divami.ims.model:ims-model | Replaces old com.soctronics.ims.model:ims-model:1.0 |

- Dependencies Removed

    | groupId:artifactId | Old version | Why |
    | -------- | -------- | -------- |
    | spring-test (compile scope) | BOM | Was incorrectly in compile scope |
    | asm:asm-all | 2.1 | No longer needed |
    | log4j (1.x) | 1.2.14 | Replaced by log4j2 bridge |
    | jackson-mapper-asl (codehaus) | 1.9.13 | Jackson 1.x removed |
    | commons-logging | 1.1.2 | Excluded via Boot |

- groupId/artifactId Changed

    | Purpose | Old | New |
    | -------- | -------- | -------- |
    | Model module | com.soctronics.ims.model:ims-model:1.0 | com.divami.ims.model:ims-model:0.0.1-SNAPSHOT |
    | Commons IO | org.apache.commons:commons-io:1.3.2 | commons-io:commons-io:2.11.0 |

- Version Bumped

    | Dependency | Old | New |
    | -------- | -------- | -------- |
    | jjwt | 0.6.0 | 0.9.1 |
    | hibernate-validator | 5.3.4.Final | 6.2.5.Final |
    | javax.el (glassfish) | 2.2.4 | 2.2.6 |
    | cglib | 2.2.2 | 3.3.0 |
    | tiles-* (all 4) | 3.0.7 | 3.0.8 |
    | jsp-api | 2.1 | 2.2 |
    | commons-fileupload | 1.3.1 | 1.5 |
    | json | 20090211 | 20231013 |
    | commons-io | 1.3.2 | 2.11.0 |

- Versions Removed (Boot-managed) — 19 dependencies

    Including: spring-security-core, aspectjrt, aspectjweaver, all log4j-*, gson, spring-core, javax.servlet-api, jstl,
    all jersey-*, jackson-databind, junit, mockito-core, json-path*

- Plugins

    | Removed | Added |
    | -------- | -------- |
    | maven-eclipse-plugin | spring-boot-maven-plugin |
    | maven-compiler-plugin | |
    | exec-maven-plugin | |

#### 4 Key Takeaways

    1. spring-boot-starter-parent 2.7.18 is the single biggest driver — it manages ~37 dependency versions in ims-model
    and ~19 in ims-web automatically
    2. MySQL connector coordinates changed — mysql:mysql-connector-java → com.mysql:mysql-connector-j (official new
    groupId)
    3. war → jar packaging + spring-boot-maven-plugin replaces the old WAR + eclipse/exec plugins
    4. Jackson 1.x (codehaus) fully removed across both modules
    5. 13 dependencies bumped with explicit versions in ims-model — these are libs Boot doesn't manage, so versions are
    pinned manually
