{"id":24617668,"url":"https://github.com/pacphi/purchase-orders-example","last_synced_at":"2026-04-12T06:31:39.632Z","repository":{"id":100006191,"uuid":"155413121","full_name":"pacphi/purchase-orders-example","owner":"pacphi","description":"This project explores design of a modern web application which includes: model, API and UI modules.","archived":false,"fork":false,"pushed_at":"2018-11-11T17:29:13.000Z","size":5667,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-18T21:34:31.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pacphi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-30T15:50:18.000Z","updated_at":"2020-12-08T00:22:39.000Z","dependencies_parsed_at":"2023-03-11T09:00:55.569Z","dependency_job_id":null,"html_url":"https://github.com/pacphi/purchase-orders-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pacphi/purchase-orders-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacphi%2Fpurchase-orders-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacphi%2Fpurchase-orders-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacphi%2Fpurchase-orders-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacphi%2Fpurchase-orders-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pacphi","download_url":"https://codeload.github.com/pacphi/purchase-orders-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacphi%2Fpurchase-orders-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31706764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T06:22:27.080Z","status":"ssl_error","status_checked_at":"2026-04-12T06:21:52.710Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-24T23:39:51.858Z","updated_at":"2026-04-12T06:31:39.627Z","avatar_url":"https://github.com/pacphi.png","language":"Java","readme":"# Purchase Orders Example (WIP)\n\n[![Build Status](https://travis-ci.org/pacphi/purchase-orders-example.svg)](https://travis-ci.org/pacphi/purchase-orders-example) [![Known Vulnerabilities](https://snyk.io/test/github/pacphi/purchase-orders-example/badge.svg)](https://snyk.io/test/github/pacphi/purchase-orders-example)\n\nThis project explores design of a modern web application which includes: model, API and UI modules.  Also a study in how one might interact with  legacy and modern Oracle databases.\n\n\n## Prerequisites\n\n* An account with [Space Developer role](https://docs.cloudfoundry.org/concepts/roles.html#roles) access on a Cloud Foundry foundation, e.g., [Pivotal Web Services](https://run.pivotal.io)\n* An account on [AWS](https://portal.aws.amazon.com/billing/signup#/start)\n* [aws-cli](https://aws.amazon.com/cli/) 1.16.40 or better\n* [CF CLI](https://github.com/cloudfoundry/cli#downloads) 6.40.0 or better if you want to push the application to a Cloud Foundry (CF) instance\n* [httpie](https://httpie.org/#installation) 0.9.9 or better to simplify interaction with API endpoints\n* [jq](https://stedolan.github.io/jq/) 1.5 or better\n* Java [JDK](https://openjdk.java.net/install/) 1.8u181 or better to compile and run the code\n* [Gradle](https://gradle.org/releases/) 4.10.2 or better to build and package source code\n* Docker for [Mac](https://store.docker.com/editions/community/docker-ce-desktop-mac) or [Windows](https://store.docker.com/editions/community/docker-ce-desktop-windows) \n* [DbVisualizer](https://www.dbvis.com/download/) 10.0.15 or better\n\n## Clone\n\n```\ngit clone https://github.com/pacphi/purchase-orders-example.git\n```\n\n\n## Build\n\nBuild this project with Gradle\n\n(Composed of multiple modules so we need to script this a bit)\n\n```\ncd orders-model\ngradle clean build\ncd ../orders-api\ngradle clean build\ncd ../orders-ui\ngradle clean build\n```\n\n## Prepare\n\n#### Docker hosted\n\nStart a database instance\n\n```\ndocker run --rm -d -p 8080:8080 -p 1521:1521 sath89/oracle-xe-11g\n```\n\n\u003e Remove the `--rm` argument above if you do not want to reap the database intance on stop\n\nConnect via DbVisualizer\n\n\u003e Consult the [documentation](http://confluence.dbvis.com/display/UG100/Setting+Up+a+Connection+Manually)\n\n![Screenshot of a successfull configuration and connection attempt to an Oracle 11g XE instance](docs/dbvis-oracle-connx.png)\n\nStop the database instance\n\n```\ndocker ps\ndocker stop {pid}\n```\n\n\u003e where `{pid}` is the currently running database container id\n\n#### AWS hosted Oracle\n\nFire up a browser and [login](https://console.aws.amazon.com/console/home) to the AWS console\n\nAlso launch a [Terminal](https://macpaw.com/how-to/use-terminal-on-mac) session, configure your accesskey, secretkey, and region \n\n```\naws configure\n\nAWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE\nAWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\nDefault region name [None]: us-west-2\nDefault output format [None]: json\n```\n\n\u003e Replace values above with your own.\n\nVisit the AWS console in your browser, navigate to `RDS`, select `Oracle` as the engine, and use the wizard to create a new instance\n\n![Screenshot of how to start creating an RDS Oracle instance](docs/aws-rds-instance-creation.png)\n\nChoose `Oracle Standard Edition Two` and click `Next`\n\nChoose `Dev/Test` for the use case and click `Next`\n\nWhen spcifying `DB details` choose the `Free tier` and complete the `Settings` dialog then click `Next`\n\nTune or accept the defaults in `Advanced settings` and click `Create database`\n\n### Database preparation\n\n// TODO Articulate the steps to connect to the AWS hosted database with DbVisualizer. Perhaps share a screenshot and script for prep?\n\n\n## Run \n\nTo startup the application, execute\n\n### Simple case \n\nWe'll fire up a local Docker instance of Oracle, then start the `orders-api` \n\n```bash\ndocker run --rm -d -p 9080:8080 -p 1521:1521 sath89/oracle-xe-11g\ncd orders-api\ngradle bootRun -Dspring.profiles.active=docker\n```\n\n### with Docker Compose\n\n// TODO\n\n### with Kubernetes\n\n// TODO\n\n\n## How to deploy to Pivotal Application Service\n\nThese instructions assume that a Oracle instance is available and was pre-provisioned \"off-platform\" (e.g., on PKS or AWS RDS Oracle).\n\n### Authenticating\n\nAuthenticate to a foundation using the API endpoint. \n\u003e E.g., login to [Pivotal Web Services](https://run.pivotal.io)\n\n```\ncf login -a https:// api.run.pivotal.io\n```\n\n### Managing secrets\n\nPlace secrets in `config/secrets.json`, e.g.,\n\n// TODO Just what is required here?\n\n```\n{\n\t\n}\n```\n\nWe'll use this file later as input configuration for the creation of either a [credhub](https://docs.pivotal.io/credhub-service-broker/using.html) or [user-provided](https://docs.cloudfoundry.org/devguide/services/user-provided.html#credentials) service instance.\n\n\u003e Replace occurrences of `xxxxx` above with appropriate values\n\n### Deploy and shutdown\n\nDeploy the app (w/ a user-provided service instance vending secrets)\n\n```\n./deploy.sh\n```\n\nDeploy the app (w/ a Credhub service instance vending secrets)\n\n```\n./deploy.sh --with-credhub\n```\n\nShutdown and destroy the app and service instances\n\n```\n./destroy.sh\n```\n\n\n## Endpoints\n\nCurrent implementation supports\n\n// TODO\n\n## Credits and further reading\n\nA curated list of links to material from which you may draw insight, inspiration and wisdom:\n\n* [Gradle Dependencies for Java, use compile or implmentation?](https://www.javacodegeeks.com/2018/03/gradle-dependencies-java-use-compile-implementation.html)\n* [Gradle's Java Library Plugin Documentation](https://docs.gradle.org/current/userguide/java_library_plugin.html)\n* [Gradle's Test API Documentation](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html)\n* [Gradle's Logging Documentation](https://docs.gradle.org/current/userguide/logging.html)\n* [Devops Java Workshop](https://github.com/Pivotal-Field-Engineering/devops-workshop)\n* [Migrating from JUnit 4 to JUnit 5](https://www.baeldung.com/junit-5-migration)\n* [JUnit 5 Assertions Javadoc](https://junit.org/junit5/docs/5.0.1/api/org/junit/jupiter/api/Assertions.html)\n* [JUnit 5 - How to assert that an exception is thrown?](https://stackoverflow.com/questions/40268446/junit-5-how-to-assert-an-exception-is-thrown)\n* [JUnit 5 Jupiter Starter Gradle Sample](https://github.com/junit-team/junit5-samples/tree/master/junit5-jupiter-starter-gradle)\n* [Validating Form Input](https://spring.io/guides/gs/validating-form-input/)\n* [Integation Testing Bean Validation (JSR 303)](http://farenda.com/java/bean-validation-unit-testing/)\n* [Spring Data JDBC - Reference Documentation](https://docs.spring.io/spring-data/jdbc/docs/1.0.0.RELEASE/reference/html/)\n* [Accessing Relational Data using JDBC with Spring](https://spring.io/guides/gs/relational-data-access/)\n* [Spring JdbcTemplate Querying Exsmples](https://www.mkyong.com/spring/spring-jdbctemplate-querying-examples/)\n* [Spring JDBC Overview](https://www.baeldung.com/spring-jdbc-jdbctemplate)\n* [Spring JDBC and Composite Primary Keys](https://stackoverflow.com/questions/3133699/spring-jdbc-and-composite-primary-keys)\n* [Calling Stored Procedures from Spring Data JPA](https://dzone.com/articles/calling-stored-procedures-from-spring-data-jpa)\n* [Simplifying JDBC operations with the SimpleJdbc classes](https://docs.spring.io/spring/docs/3.0.0.M4/reference/html/ch12s05.html)\n* [Testcontainers](https://www.testcontainers.org)\n* [Testcontainers and Spring Boot](https://dzone.com/articles/testcontainers-and-spring-boot)\n* [JUnit 5 and Testcontainers](https://speakerdeck.com/timriemer/junit-5-and-testcontainers)\n* [How to customize the Environment or ApplicationContext before it starts](https://docs.spring.io/spring-boot/docs/current/reference/html/howto-spring-boot-application.html#howto-customize-the-environment-or-application-context)\n* [Spring Boot 2 With JUnit 5 and Mockito 2 for Unit, Integration Testing](https://dzone.com/articles/spring-boot-2-with-junit-5-and-mockito-2-for-unit)\n* [Testing in Spring Boot](https://www.baeldung.com/spring-boot-testing)\n* [Testing the Web Layer](https://spring.io/guides/gs/testing-web)\n* [Unit and Integration Tests for RestControllers in Spring Boot](https://thepracticaldeveloper.com/2017/07/31/guide-spring-boot-controller-tests/#Strategy_2_MockMVC_with_WebApplicationContext)\n* [Integration Testing POSTing an entire object to Spring MVC controller](https://stackoverflow.com/questions/17143116/integration-testing-posting-an-entire-object-to-spring-mvc-controller)\n* [Writing Integration Tests for Rest Services with Spring Boot](http://www.springboottutorial.com/integration-testing-for-spring-boot-rest-services)\n* [Hamcrest Matchers - Javadoc](http://hamcrest.org/JavaHamcrest/javadoc/2.0.0.0/)\n* [JsonPath Examples](https://github.com/json-path/JsonPath#path-examples)\n* [Mockito void Method Example](https://examples.javacodegeeks.com/core-java/mockito/mockito-void-method-example/)\n* [Mockito Verify Cookbook](https://www.baeldung.com/mockito-verify)\n* [Base Starter for Vaadin Flow and Spring](https://vaadin.com/start/latest/project-base-spring)\n* [Gradle Vaadin Flow plugin](https://github.com/devsoap/gradle-vaadin-flow/)\n* [Oracle Database XE Downloads](https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html)\n* [Oracle 12c XE Docker Image](https://hub.docker.com/r/sath89/oracle-12c/)\n* [Oracle 11g XE Docker Image](https://hub.docker.com/r/sath89/oracle-xe-11g/)\n* [Creating an Oracle DB Instance and Connecting to a Database on an Oracle DB Instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.Oracle.html)\n* [Schema Object Names and Qualifiers](https://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements008.htm)\n* [How to Return ResultSet from Stored Procedure in Oracle?](https://www.foxinfotech.in/2018/08/how-to-return-resultset-from-stored-procedure-in-oracle.html)\n* [Using Ref Cursors To Return Recordsets](https://oracle-base.com/articles/misc/using-ref-cursors-to-return-recordsets)\n* [Is Oracle's SYS_GUID() UUID RFC 4122 compliant?](https://stackoverflow.com/questions/6505837/is-oracles-sys-guid-uuid-rfc-4122-compliant)\n* [Options for having Oracle Database vend UUID](https://oracle-base.com/articles/9i/uuid-9i)\n* [Java UUID Generator](https://www.journaldev.com/17182/java-uuid-generator-java-guid)\n* [Convert LocalDate to LocalDateTime or java.sql.Timestamp\n](https://stackoverflow.com/questions/8992282/convert-localdate-to-localdatetime-or-java-sql-timestamp)\n* [Liquibase Documentation](http://www.liquibase.org/documentation/index.html)\n* [Use Liquibase to Safely Evolve Your Database Schema](https://www.baeldung.com/liquibase-refactor-schema-of-java-app)\n* [Introduction to Liquibase and Managing Your Database Source Code](https://blogs.oracle.com/shay/introduction-to-liquibase-and-managing-your-database-source-code)\n* [Spring MVC @RequestMapping, @PathVariable and @RequestParams examples](https://www.journaldev.com/3358/spring-requestmapping-requestparam-pathvariable-example)\n* [Spring Boot Actuator - Production Ready Endpoints](https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html#production-ready-endpoints)\n* [Spring Boot 2.1 Release Notes](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.1-Release-Notes#spring-boot-21-release-notes)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacphi%2Fpurchase-orders-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpacphi%2Fpurchase-orders-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacphi%2Fpurchase-orders-example/lists"}