Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: update dependencies, refactor class namings, remove centralized constants, refactor test to use @MockitoBean #21

Merged
merged 7 commits into from
Dec 26, 2024

Conversation

alekszivko
Copy link
Owner

fixes #8 #7

Code changes

  • remove conflicting/duplicate methods in restController
    some methods where actually the same but used different endpoints that was hard to see due to constant usage and also does not conform rest best practises e.g. producer/id and producers/api/producer/id
  • adapt test to changes
  • adapt storageObjectRepo to return Optionals and service to don't take optionals
  • remove AdviceGlobalRestController.java
    duplicate of other class
  • remove ApiMarker.java
    wrong location and duplicate
  • remove CommandSearch.java
    no use-case
  • remove DatabaseORCL.java
    no use-case
  • remove EnumHelper.java
    no use-case
  • remove ExceptionOrcl.java
    no use-case and database/vendor specific naming
  • remove ServiceInit.java
    no use-case
  • remove TestRestControllerProducer.java
    test was supposed to be a RestController test but was a service test
  • exchange @MockBean with @MockitoBean in all Controller and RestController tests

Version updates

Bumps org.springdoc:springdoc-openapi-starter-webmvc-ui from 2.5.0 to 2.7.0.

Bumps org.postgresql:postgresql from 42.7.2 to 42.7.4.

Bumps org.springframework.boot:spring-boot-starter-parent from 3.2.3 to 3.4.1.

Bumps org.springframework.boot:spring-boot-devtools from 3.1.5 to 3.4.1.

Bumps querydsl.version from 5.0.0 to 5.1.0.

  • Updates com.querydsl:querydsl-apt from 5.0.0 to 5.1.0
  • Updates com.querydsl:querydsl-jpa from 5.0.0 to 5.1.0

dependabot bot and others added 7 commits December 25, 2024 03:03
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.7.2 to 42.7.4.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](pgjdbc/pgjdbc@REL42.7.2...REL42.7.4)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.2.3 to 3.4.1.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.2.3...v3.4.1)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps `querydsl.version` from 5.0.0 to 5.1.0.

Updates `com.querydsl:querydsl-apt` from 5.0.0 to 5.1.0

Updates `com.querydsl:querydsl-jpa` from 5.0.0 to 5.1.0

---
updated-dependencies:
- dependency-name: com.querydsl:querydsl-apt
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.querydsl:querydsl-jpa
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#5)

* Bump querydsl.version from 5.0.0 to 5.1.0

Bumps `querydsl.version` from 5.0.0 to 5.1.0.

Updates `com.querydsl:querydsl-apt` from 5.0.0 to 5.1.0

Updates `com.querydsl:querydsl-jpa` from 5.0.0 to 5.1.0

---
updated-dependencies:
- dependency-name: com.querydsl:querydsl-apt
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.querydsl:querydsl-jpa
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump org.springframework.boot:spring-boot-devtools from 3.1.5 to 3.4.1

Bumps [org.springframework.boot:spring-boot-devtools](https://github.com/spring-projects/spring-boot) from 3.1.5 to 3.4.1.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.1.5...v3.4.1)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-devtools
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [org.springdoc:springdoc-openapi-starter-webmvc-ui](https://github.com/springdoc/springdoc-openapi) from 2.5.0 to 2.7.0.
- [Release notes](https://github.com/springdoc/springdoc-openapi/releases)
- [Changelog](https://github.com/springdoc/springdoc-openapi/blob/main/CHANGELOG.md)
- [Commits](springdoc/springdoc-openapi@v2.5.0...v2.7.0)

---
updated-dependencies:
- dependency-name: org.springdoc:springdoc-openapi-starter-webmvc-ui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…MockitoBean (#19)

fixes #7

- remove AdviceGlobalRestController.java
  duplicate of other class
- remove ApiMarker.java
  wrong location and duplicate
- remove CommandSearch.java
  no use-case
- remove DatabaseORCL.java
  no use-case
- remove EnumHelper.java
  no use-case
- remove ExceptionOrcl.java
  no use-case and database/vendor specific naming
- remove ServiceInit.java
  no use-case
- remove TestRestControllerProducer.java
  test was supposed to be a RestController test but was a service test
- exchange @MockBean with @MockitoBean in all Controller and RestController tests

Signed-off-by: Aleksandar Zivkovic <[email protected]>
- remove conflicting/duplicate methods in restController
  some methods where actually the same but used different endpoints that was hard to see due to constant usage and also does not conform rest best practises e.g. producer/id and producers/api/producer/id
- adapt test to changes
- adapt storageObjectRepo to return Optionals and service to don't take optionals

fixes #8

Signed-off-by: Aleksandar Zivkovic <[email protected]>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
5.2% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@alekszivko alekszivko merged commit 1ecf593 into main Dec 26, 2024
6 of 7 checks passed
@alekszivko alekszivko deleted the dev branch December 26, 2024 15:38
@alekszivko alekszivko restored the dev branch December 26, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove centralized constant Classes
1 participant