Hello good soul!
This repo is a fok of https://github.com/spring-petclinic/spring-petclinic-reactjs. I created it just to be able to learn Spring in more depth and to remember working with such mix break of over half a year at the moment of writing this.
I'm putting this up in hope that it might help someone traveling up the same path as me. That is to understand setting up a Spring Boot+Hibernate+React App.
As I believe in learning by doing.
I also believe that doing something that you're passionate about.
One of my biggest DIY interests is programming MCU's and
IoT'izing lights at my flat in Warsaw (esp8266 + C++; platformio with OTA by CI/CD but It's in the process of dockerizing)
and recently my refrigerator on Wemos D1 mini in Micro Python (I'll try to put this up on GH as well)
This repo is a fork of https://github.com/spring-petclinic/spring-petclinic-reactjs that I I'll try to maintain as time allows.
Soon I also hope to start sharing my technical knowledge that I am storing in form of a tree of hyperlinks, a vast mind-map ranging from mathematics through Micro Python to Java and Spring and beyond.
I hope to start a blog sharing stuff I learn (recently a few thoughts on ".dotfiles")
Note: Spring Boot Server App must be running before starting the client!
To start the server, launch a Terminal and run from the project's root folder (spring-petclinic
):
./mvnw spring-boot:run
When the server is running you can try to access the API for example to query all known pet types:
curl http://localhost:8080/api/pettypes
After starting the server you can install and run the client from the client
folder:
npm install
(installs the node modules and the TypeScript definition files)PORT=4444 npm start
- Open
http://localhost:4444
(Why not use the same server for backend and frontend? Because Webpack does a great job for serving JavaScript-based SPAs and I think it's not too uncommon to run this kind of apps using two dedicated server, one for backend, one for frontend)
In case you have any comments, please feel free to open an issue in this repository. If you want to contact me, please do so at lepi at hackerspace.pl : )
Spring Boot Configuration | |
---|---|
The Main Class | PetClinicApplication.java |
Properties Files | application.properties |
Caching | Use of EhCache CacheConfig.java ehcache.xml |
Dandelion | DatatablesFilter, DandelionFilter and DandelionServlet registration DandelionConfig.java |
Spring MVC - XML integration | CustomViewsConfiguration.java |
One 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:
Name | Issue |
---|---|
Spring JDBC: simplify usage of NamedParameterJdbcTemplate | SPR-10256 and SPR-10257 |
Bean Validation / Hibernate Validator: simplify Maven dependencies and backward compatibility | HV-790 and HV-792 |
Spring Data: provide more flexibility when working with JPQL queries | DATAJPA-292 |
Eclipse: validation bug when working with .tag/.tagx files (has only been fixed for Eclipse 4.3 (Kepler)). See here for more details. | STS-3294 |
The 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.