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

Get Java REST API backend started #91

Closed
10 of 11 tasks
RMCampos opened this issue Sep 14, 2023 · 3 comments · Fixed by #105
Closed
10 of 11 tasks

Get Java REST API backend started #91

RMCampos opened this issue Sep 14, 2023 · 3 comments · Fixed by #105
Assignees
Labels
enhancement New feature or request

Comments

@RMCampos
Copy link

RMCampos commented Sep 14, 2023

Describe the task
Create initial backend service with Java 17 and Spring Boot.

Jira task: https://apps.nrs.gov.bc.ca/int/jira/browse/SILVA-180

Acceptance Criteria

  • Create project and commit initial files
  • Review dependencies and pom.xml file
  • Building profiles: dev, cloud native
  • Unit and Integration tests plugins
  • JaCoCo Coverage plugin
  • Google checkstyle plugin
  • Add service on docker-compose file
  • Enable Actuator and Health Check endpoint
  • Create sample Unit Test and get it passing
  • Add CI/CD workflows
  • Update readmes

Additional context

  • None
@RMCampos RMCampos added the enhancement New feature or request label Sep 14, 2023
@RMCampos RMCampos self-assigned this Sep 14, 2023
RMCampos pushed a commit that referenced this issue Sep 14, 2023
Issue #91

This commit adds initial files generated by start.spring.io website
where the project was generated with:

- Project: Maven
- Language: Java
- Spring Boot version: 3.1.3 (latest stable)
- Project metadata group: ca.bc.gov.restapi
- Project metadata artifact: results
- Project metadata name: results
- Project metadata description: RESULTS REST API
- Packaging: Jar
- Java version: 17
- Dependencies
  - Actuator
  - Data JPA
  - OAuth2 Authorization server
  - OAuth2 client
  - Started web
  - Devtools
  - H2 Database
  - Lombok
  - GraalVM
RMCampos pushed a commit that referenced this issue Sep 15, 2023
Issue #91

Adding the maven wrapper is a good practice, recommended in case you
want to use maven out of the box.
RMCampos pushed a commit that referenced this issue Sep 15, 2023
Issue #91

This change adds required dependencies for building, running and
packaging the service locally and for Cloud Native images. This is what
was changed:

- Add project license
- Add properties and definitions
- Add profiles for dev, prod and native
- Add dependencies
- Add plugins for building, running and packaging
- Add project final name jar, line 179
RMCampos pushed a commit that referenced this issue Sep 15, 2023
Issue #91

This commit adds the google checkstyle xml definition file to be used as
a guide for the checkings. Also updates existing class files to met the
checkstyle validations, replacing tab by spaces, adding JavaDoc to all
public classes.
RMCampos pushed a commit that referenced this issue Sep 15, 2023
Issue #91

This change adds a new service to the docker-compose file for the
backend REST api. If you want to run the backend locally all you need is
to run at the project root folder: `docker compose up backend` and
you're all set.

Other minor changes were made:
- Add some properties to the application properties file
- Remove dependencies not required for now
@RMCampos
Copy link
Author

Cloud Native is building fine!

image

@RMCampos
Copy link
Author

Cloud Native running fine! Less than one second to be ready. 💯

image

RMCampos pushed a commit that referenced this issue Sep 19, 2023
Issue #91

This change gets tests passing and cloud native build working and
running smoothly.
RMCampos pushed a commit that referenced this issue Sep 20, 2023
Issue #91

This change simply add more information on the new service in the back
end.
RMCampos pushed a commit that referenced this issue Sep 22, 2023
Issue #91

This change updates the Spring Boot version to the latest (at the time
of this writing), which is 3.1.4. And also updates the required Java
version required to compile and run this service, which is the 21.
@RMCampos
Copy link
Author

RMCampos commented Sep 25, 2023

Docker compose running locally. It's all set now.

image

RMCampos pushed a commit that referenced this issue Sep 25, 2023
Issue #91

This commit updates the existing docker-compose file to use the latest
maven with Java 21 available at this moment.
@RMCampos RMCampos linked a pull request Sep 25, 2023 that will close this issue
9 tasks
RMCampos pushed a commit that referenced this issue Sep 26, 2023
Issue #91

This change simply change the required version by spring boot of this
dependency. You can learn more about it here:

- spring-projects/spring-boot#32221
- https://avd.aquasec.com/nvd/2022/cve-2022-1471/
RMCampos pushed a commit that referenced this issue Sep 26, 2023
* feat: add backend initial files

Issue #91

This commit adds initial files generated by start.spring.io website
where the project was generated with:

- Project: Maven
- Language: Java
- Spring Boot version: 3.1.3 (latest stable)
- Project metadata group: ca.bc.gov.restapi
- Project metadata artifact: results
- Project metadata name: results
- Project metadata description: RESULTS REST API
- Packaging: Jar
- Java version: 17
- Dependencies
  - Actuator
  - Data JPA
  - OAuth2 Authorization server
  - OAuth2 client
  - Started web
  - Devtools
  - H2 Database
  - Lombok
  - GraalVM

* feat: add maven wrapper jar

Issue #91

Adding the maven wrapper is a good practice, recommended in case you
want to use maven out of the box.

* feat: add plugins and review pom.xml backend file

Issue #91

This change adds required dependencies for building, running and
packaging the service locally and for Cloud Native images. This is what
was changed:

- Add project license
- Add properties and definitions
- Add profiles for dev, prod and native
- Add dependencies
- Add plugins for building, running and packaging
- Add project final name jar, line 179

* feat: add google checkstyle

Issue #91

This commit adds the google checkstyle xml definition file to be used as
a guide for the checkings. Also updates existing class files to met the
checkstyle validations, replacing tab by spaces, adding JavaDoc to all
public classes.

* feat: add backend to docker compose file

Issue #91

This change adds a new service to the docker-compose file for the
backend REST api. If you want to run the backend locally all you need is
to run at the project root folder: `docker compose up backend` and
you're all set.

Other minor changes were made:
- Add some properties to the application properties file
- Remove dependencies not required for now

* test: fix test cases and tests configuration

Issue #91

This change gets tests passing and cloud native build working and
running smoothly.

* docs: update readme file to include new service

Issue #91

This change simply add more information on the new service in the back
end.

* feat: update sb version to 3.1.4 and java to 21

Issue #91

This change updates the Spring Boot version to the latest (at the time
of this writing), which is 3.1.4. And also updates the required Java
version required to compile and run this service, which is the 21.

* feat: update docker compose to run with java 21

Issue #91

This commit updates the existing docker-compose file to use the latest
maven with Java 21 available at this moment.

* fix: trivy warning cve-2022-1471

Issue #91

This change simply change the required version by spring boot of this
dependency. You can learn more about it here:

- spring-projects/spring-boot#32221
- https://avd.aquasec.com/nvd/2022/cve-2022-1471/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant