spring-petclinic / spring-petclinic-reactjs Goto Github PK
View Code? Open in Web Editor NEWReactJS (with TypeScript) and Spring Boot version of the Spring Petclinic sample application
License: Apache License 2.0
ReactJS (with TypeScript) and Spring Boot version of the Spring Petclinic sample application
License: Apache License 2.0
I facing this error. Kindly, help in resolving the same.
java.lang.IllegalStateException: Restarter has not been initialized
at org.springframework.util.Assert.state(Assert.java:392) ~[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.boot.devtools.restart.Restarter.getInstance(Restarter.java:545) ~[spring-boot-devtools-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:48) ~[spring-boot-devtools-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.boot.context.event.EventPublishingRunListener.contextLoaded(EventPublishingRunListener.java:85) ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplicationRunListeners.contextLoaded(SpringApplicationRunListeners.java:66) ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:365) ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185) ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174) ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.samples.petclinic.PetClinicApplication.main(PetClinicApplication.java:30) ~[classes/:na]
I'm unable to run the app locally, I see many errors โ The app is built with Spring Boot v1.4 and I'm with JDK 17?! It seems this project has not received updates for long time (Last commit on /src folder was 6 years ago!), this indicates that it has become outdated so it lacks compatibility with newer techs, patterns and best practices.
I suggest to do an upgrade (ideally to latest version Spring Boot v3).
FYI: The main Spring PetClinic project is actively maintained and regularly updated! It can serve as an excellent reference to guide the upgrade process here.
Please let me know if you have any questions or require further information to support this issue.
I've got this error when I start the Node JS server. My Node and NPM are up to date:
Any idea ?
./run.sh
> [email protected] start /Dev/spring-petclinic-reactjs/client
> node server.js
Starting the development server...
ts-loader: Using [email protected] and /Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/tsconfig.json
/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/typescript/lib/typescript.js:3177
throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
^
Error: Debug Failure. False expression:
at Object.assert (/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/typescript/lib/typescript.js:3177:23)
at resolveExternalModule (/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/typescript/lib/typescript.js:25418:30)
at resolveExternalModuleNameWorker (/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/typescript/lib/typescript.js:25380:20)
at mergeModuleAugmentation (/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/typescript/lib/typescript.js:24590:34)
at initializeTypeChecker (/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/typescript/lib/typescript.js:42705:25)
at Object.createTypeChecker (/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/typescript/lib/typescript.js:24428:9)
at getDiagnosticsProducingTypeChecker (/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/typescript/lib/typescript.js:62530:93)
at Object.getGlobalDiagnostics (/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/typescript/lib/typescript.js:62848:41)
at Object.getCompilerOptionsDiagnostics (/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/typescript/lib/typescript.js:79004:84)
at Compiler.<anonymous> (/Users/arey/Dev/GitHub/spring-petclinic-reactjs/client/node_modules/ts-loader/index.js:308:72)
npm ERR! Darwin 16.3.0
npm ERR! argv "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.2.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the spring-petclinic-reactjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs spring-petclinic-reactjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls spring-petclinic-reactjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Dev/spring-petclinic-reactjs/client/npm-debug.log
I've don't change anything into the client directory but the travis.ci failed:
https://travis-ci.org/spring-petclinic/spring-petclinic-reactjs
Some logs:
> [email protected] build:prod /home/travis/build/spring-petclinic/spring-petclinic-reactjs/client
> rimraf ./public/dist && NODE_ENV=production webpack --config webpack.config.prod.js
ts-loader: Using [email protected] and /home/travis/build/spring-petclinic/spring-petclinic-reactjs/client/tsconfig.json
/home/travis/build/spring-petclinic/spring-petclinic-reactjs/client/node_modules/webpack-core/lib/NormalModuleMixin.js:163
if(isError) throw e;
^
Error: Debug Failure. False expression:
at Object.assert (/home/travis/build/spring-petclinic/spring-petclinic-
...
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
Compare to the previous successfully build https://travis-ci.org/spring-petclinic/spring-petclinic-reactjs/builds/181606878 I've noticed webpack have been updated : [email protected] --> [email protected]
Below are the list of issues and fixes done in my local dev:
Validation should check for valid string values for first name and last name when adding an Owner, fixed this by adding @pattern(regexp = "[a-z-A-Z]*", message = "First name has invalid characters")
Validation should check for null value from date input when adding a Pet, fixed this by adding @NotNull
Validation should set a max range for a string with min range, fixed this by adding the max value in @SiZe(min = 2, max = 14 )
I would like to propose upgrading the client app of this project to React v18.
The current version of React used in the project may lack some of the latest features and optimizations introduced in the modern versions. Additionally, the application may face compatibility issues with the latest React ecosystem, libraries, and tooling.
Upgrading to modern versions will address these problems and provide developers with access to the most recent advancements in React .
I believe that upgrading and adding new features will enhance the development experience. This will enable developers to work with the latest technologies.
Please let me know if you have any questions or if there's any further information I can provide to support this enhancement proposal.
In the file "petclinic_db_setup_mysql" which explains how to set up the mysql database.
The files "db/mysql/initDB.sql" and "src/main/resources/spring/data-access.properties" are missing.
GitHub uses linguist to detect languages. For spring-petclinic-reactks, CSS is the first one. It should be Java or TypeScript.
We could customize this behavior, See https://github.com/spring-petclinic/spring-petclinic-kotlin/blob/master/.gitattributes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.