在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:spring-petclinic/spring-framework-petclinic开源软件地址:https://github.com/spring-petclinic/spring-framework-petclinic开源编程语言:Java 94.7%开源软件介绍:Spring PetClinic Sample ApplicationApproved by the Spring team, this repo is a fork of the spring-projects/spring-petclinic. It allows the Spring community to maintain a Petclinic version with a plain old Spring Framework configuration and with a 3-layer architecture (i.e. presentation --> service --> repository). The "canonical" implementation is now based on Spring Boot, Thymeleaf and aggregate-oriented domain. Understanding the Spring Petclinic application with a few diagramsSee the presentation here (2017 update) Running petclinic locallyWith Maven command line
With Docker
You can then access petclinic here: http://localhost:8080/ In case you find a bug/suggested improvement for Spring PetclinicOur issue tracker is available here: https://github.com/spring-petclinic/spring-framework-petclinic/issues Database configurationIn its default configuration, Petclinic uses an in-memory database (H2) which gets populated at startup with data. A similar setups is provided for MySQL and PostgreSQL in case a persistent database configuration is needed. To run petclinic locally using persistent database, it is needed to run with profile defined in main pom.xml file. For MySQL database, it is needed to run with 'MySQL' profile defined in main pom.xml file.
Before do this, would be good to check properties defined in MySQL profile inside pom.xml file.
You could start MySQL locally with whatever installer works for your OS, or with docker:
For PostgreSQL database, it is needed to run with 'PostgreSQL' profile defined in main pom.xml file.
Before do this, would be good to check properties defined in PostgreSQL profile inside pom.xml file.
You could also start PostgreSQL locally with whatever installer works for your OS, or with docker:
Persistence layer choiceThe persistence layer have 3 available implementations: JPA (default), JDBC and Spring Data JPA.
The default JPA implementation could be changed by using a Spring profile:
Working with Petclinic in your IDEPrerequisitesThe following items should be installed in your system:
Steps:
Then either build on the command line
In the main menu, select CSS files are generated from the Maven build. You can either build them on the command line Go to the
Visit http://localhost:8080 in your browser. Working with Petclinic in IntelliJ IDEAprerequisitesThe following items should be installed in your system: Looking for something in particular?
Publishing a Docker imageThis application uses Google Jib to build an optimized Docker image
into the Docker Hub
repository.
The pom.xml has been configured to publish the image with a the Jib containerizes this WAR project by using the distroless Jetty as a base image. Build and push the container image of Petclinic to the Docker Hub registry:
Interesting Spring Petclinic forksThe Spring Petclinic master branch in the main spring-projects GitHub org is the "canonical" implementation, currently based on Spring Boot and Thymeleaf. This spring-framework-petclinic project is one of the several forks hosted in a special GitHub org: spring-petclinic. If you have a special interest in a different technology stack that could be used to implement the Pet Clinic then please join the community there. Interaction with other open source projectsOne of the best parts about working on the Spring Petclinic application is that we have the opportunity to work in direct contact with many Open Source projects. We found some bugs/suggested improvements on various topics such as Spring, Spring Data, Bean Validation and even Eclipse! In many cases, they've been fixed/implemented in just a few days. Here is a list of them:
ContributingThe issue tracker is the preferred channel for bug reports, features requests and submitting pull requests. For pull requests, editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at http://editorconfig.org. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论