{"id":14992847,"url":"https://github.com/spring-petclinic/spring-petclinic-angularjs","last_synced_at":"2025-04-13T06:37:06.427Z","repository":{"id":81725244,"uuid":"73403528","full_name":"spring-petclinic/spring-petclinic-angularjs","owner":"spring-petclinic","description":"AngularJS 1 and Spring Boot 2 version of the Spring Petclinic sample application","archived":false,"fork":false,"pushed_at":"2024-04-29T10:25:21.000Z","size":5475,"stargazers_count":72,"open_issues_count":6,"forks_count":96,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-26T23:06:18.117Z","etag":null,"topics":["angular1","angularjs","devtools","spring-boot"],"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/spring-petclinic.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":"2016-11-10T17:09:22.000Z","updated_at":"2025-03-08T05:01:54.000Z","dependencies_parsed_at":"2024-10-12T04:21:34.167Z","dependency_job_id":null,"html_url":"https://github.com/spring-petclinic/spring-petclinic-angularjs","commit_stats":{"total_commits":479,"total_committers":25,"mean_commits":19.16,"dds":0.5720250521920668,"last_synced_commit":"0bfcd92fc525cd70f5d23576900d0f47ddcca0f4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-angularjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-angularjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-angularjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-angularjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spring-petclinic","download_url":"https://codeload.github.com/spring-petclinic/spring-petclinic-angularjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675334,"owners_count":21143763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["angular1","angularjs","devtools","spring-boot"],"created_at":"2024-09-24T15:03:19.648Z","updated_at":"2025-04-13T06:37:06.401Z","avatar_url":"https://github.com/spring-petclinic.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AngularJS and Spring Boot version of the Spring PetClinic Sample Application [![Build Status](https://travis-ci.org/spring-petclinic/spring-petclinic-angularjs.svg?branch=master)](https://travis-ci.org/spring-petclinic/spring-petclinic-angularjs/)\n\n## Understanding the Spring Petclinic application with a few diagrams\n[See the presentation here](http://fr.slideshare.net/AntoineRey/spring-framework-petclinic-sample-application)\n\n## Running petclinic locally\n```\ngit clone https://github.com/spring-petclinic/spring-petclinic-angularjs.git\ncd spring-petclinic-angularjs\n./mvnw clean install\ncd spring-petclinic-server\n../mvnw spring-boot:run\n```\n\nYou can then access petclinic here: http://localhost:8080/\n\n\u003cimg width=\"782\" alt=\"spring-petclinic\" src=\"https://cloud.githubusercontent.com/assets/838318/19653851/61c1986a-9a16-11e6-8b94-03fd7f775bb3.png\"\u003e\n\n## In case you find a bug/suggested improvement for Spring Petclinic\nOur issue tracker is available here: https://github.com/spring-petclinic/spring-petclinic-angularjs/issues\n\n## Database configuration\n\nIn its default configuration, Petclinic uses an in-memory database (HSQLDB) which gets populated at startup with data.\nA similar setups is provided for MySql in case a persistent database configuration is needed.\nTo run petclinic locally using MySQL database, it is needed to change profile defined in the  application.properties` file.\n\nFor MySQL database, it is needed to switch profile. There is two ways:\n\n1. Update application properties: open the `application.properties` file, then change the value `hsqldb` to `mysql`\n2. Use a Spring Boot JVM parameter: simply start the JVM with the `-Dspring.profiles.active=mysql.prod` parameter.\n\n\nBefore do this, it would be good to change JDBC url properties defined in the `application-mysql.properties` file:\n\n```\nspring.datasource.url = jdbc:mysql://localhost:3306/petclinic?useUnicode=true\nspring.datasource.username=root\nspring.datasource.password=petclinic \n```      \n\nThe `localhost` host should be set for a MySQL dabase instance started on your local machine.\nYou may also start a MySql database with docker:\n\n```\ndocker run --name mysql-petclinic -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7\n```\n\n\n## Docker\n\n### Run an image\n\nTo run a Docker image of Petclinic with its embedded HSQL database, you may \n\n```\ndocker run -p 8080:8080 -t --name springboot-petclinic arey/springboot-petclinic\n```\n\nIf you want to use MySQL, you first have to change the `spring.datasource.url` declared in the `application-mysql.properties` file.\nYou have to rebuild the image (see next section).\nThen you could activated the `mysql` profile:\n\n```\ndocker run -e \"SPRING_PROFILES_ACTIVE=mysql,prod\" -p 8080:8080 -t --name springboot-petclinic arey/springboot-petclinic\n```\n\n### Use Docker Compose\n\nThe simplest way is to use docker-compose\n\n```\ndocker-compose up\n```\n\n### Build an image\n\nTo rebuild a Docker image on your device:\n```\n./mvnw clean install\ncd spring-petclinic-server\nmvn clean package docker:build\n```\n\nTo publish a new image into Docker Hub:\n```\nmvn clean package docker:build -DpushImageTag\n```\n\n## Working with Petclinic in Eclipse/STS\n\n### prerequisites\nThe following items should be installed in your system:\n* Maven 3 (http://www.sonatype.com/books/mvnref-book/reference/installation.html)\n* git command line tool (https://help.github.com/articles/set-up-git)\n* Eclipse with the m2e plugin (m2e is installed by default when using the STS (http://www.springsource.org/sts) distribution of Eclipse)\n\nNote: when m2e is available, there is an m2 icon in Help -\u003e About dialog.\nIf m2e is not there, just follow the install process here: http://eclipse.org/m2e/download/\n\n\n### Steps:\n\n1) In the command line\n```\ngit clone https://github.com/spring-projects/spring-petclinic.git\n```\n2) Inside Eclipse\n```\nFile -\u003e Import -\u003e Maven -\u003e Existing Maven project\n```\n\n### Active the dev Spring profile\n\nIn development mode, we recommand you yo use the ```dev``` Spring profile.\nJust add the following VM option:\n```\n-Dspring.profiles.active=dev\n```\nAll static resources changes will be monitored by the embedded LiveReload server of Spring Boot Devtools.\nSee [application-dev.properties](spring-petclinic-server/src/main/resources/application-dev.properties) for details.\n\n## Client-side Architecture\n\nCompared to the [standard Petclinic based on JSP pages](https://github.com/spring-projects/spring-petclinic), \nthis SpringBoot AngularJS Petclinic is splitted in 2 modules - a client module and a server module:\n* spring-petclinic-client : static resources (images, fonts, style, angular JS code) packaged as a webjar.\n* spring-petclinic-server : Spring MVC REST API and an index.html template\n\n\n## Looking for something in particular?\n\n| Spring Boot Configuration     | Files |\n|-------------------------------|-------|\n| The Main Class                | [PetClinicApplication.java](spring-petclinic-server/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java)  |\n| Common properties file        | [application.properties](spring-petclinic-server/src/main/resources/application.properties)  |\n| Development properties file   | [application-dev.properties](spring-petclinic-server/src/main/resources/application-dev.properties)  |\n| Production properties file    | [application-prod.properties](spring-petclinic-server/src/main/resources/application-prod.properties)  |\n| Caching: Cache with EhCache   | [CacheConfig.java](spring-petclinic-server/src/main/java/org/springframework/samples/petclinic/config/CacheConfig.java) |\n| Homepage                      | Map root context to the index.html template: [WebConfig.java](spring-petclinic-server/src/main/java/org/springframework/samples/petclinic/config/WebConfig.java) |\n\n\n| Front-end module  | Files |\n|-------------------|-------|\n| Node and NPM      | [The frontend-maven-plugin plugin downloads/installs Node and NPM locally then runs Bower and Gulp](spring-petclinic-client/pom.xml)  |\n| Bower             | [JavaScript libraries are defined by the manifest file bower.json](spring-petclinic-client/bower.json)  |\n| Gulp              | [Tasks automated by Gulp: minify CSS and JS, generate CSS from LESS, copy other static resources](spring-petclinic-client/gulpfile.js)  |\n| Angular JS        | [app.js, controllers and templates](spring-petclinic-client/src/scripts/)  |\n\n\n## Interesting Spring Petclinic forks\n\nThe Spring Petclinic master branch in the main [spring-projects](https://github.com/spring-projects/spring-petclinic)\nGitHub org is the \"canonical\" implementation, currently based on Spring Boot and Thymeleaf.\n\nThis [spring-petclinic-angularjs][] project is one of the [several forks](https://spring-petclinic.github.io/docs/forks.html) \nhosted in a special GitHub org: [spring-petclinic](https://github.com/spring-petclinic).\nIf you have a special interest in a different technology stack\nthat could be used to implement the Pet Clinic then please join the community there.\n\n# Contributing\n\nThe [issue tracker](https://github.com/spring-petclinic/spring-petclinic-angularjs/issues) is the preferred channel for bug reports, features requests and submitting pull requests.\n\nFor pull requests, editor preferences are available in the [editor config](https://github.com/spring-projects/spring-petclinic/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at \u003chttp://editorconfig.org\u003e.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-angularjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-angularjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-angularjs/lists"}