spring-petclinic / spring-petclinic-angularjs Goto Github PK
View Code? Open in Web Editor NEWAngularJS 1 and Spring Boot 2 version of the Spring Petclinic sample application
AngularJS 1 and Spring Boot 2 version of the Spring Petclinic sample application
Migrate from Angular JS 1.x to Angular 2. Maybe in another repo of the Spring Petclinic organization?
The parent project in pom.xml file is not found, the part
<parent>
<groupId>org.springframework.samples</groupId>
<artifactId>spring-petclinic-angular1</artifactId>
<version>2.0.0-M2</version>
</parent>
results in error in IDEA Java 2017.1.3
Hi,
after I've started the server and accessed localhost URL as described in Read.me,
i.e. GET http://localhost:8080/angular-ui-router/release/angular-ui-router.min.js
I get the following in Firefox:
"http://localhost:8080/angular-ui-router/release/angular-ui-router.min.js". localhost:8080:22 Error: [$injector:modulerr] Failed to instantiate module petClinicApp due to: [$injector:modulerr] Failed to instantiate module ui.router due to: [$injector:nomod] Module 'ui.router' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.6.6/$injector/nomod?p0=ui.router minErr/<@http://localhost:8080/angular/angular-79054c75a5ca6ab7e1ecc2247145c34c.js:116:12 module/<@http://localhost:8080/angular/angular-79054c75a5ca6ab7e1ecc2247145c34c.js:2297:17 ensure@http://localhost:8080/angular/angular-79054c75a5ca6ab7e1ecc2247145c34c.js:2218:38 module@http://localhost:8080/angular/angular-79054c75a5ca6ab7e1ecc2247145c34c.js:2295:14 loadModules/<@http://localhost:8080/angular/angular-79054c75a5ca6ab7e1ecc2247145c34c.js:4933:22 forEach@http://localhost:8080/angular/angular-79054c75a5ca6ab7e1ecc2247145c34c.js:410:11 loadModules@http://localhost:8080/angular/a
The main README includes this comment (inherited from spring-petclinic ?) but the code and comments seem to have diverged:
A similar setup is provided for MySql ...
There's no main/resources/application-mysql.properties
for example. I'm trying to run this using the Docker image arey/springboot-petclinic adding in a likely properties file and hacking the classpath, but it's then failing with:
java.sql.SQLException: Unable to load class: com.mysql.jdbc.Driver
Is it missing the mysql-connector-java artifact? I've been looking to add the driver post-hoc but having trouble finding something suitable in the Alpine repo, or shoehorning changes into the startup. I'd rather find a repackaging solution than start hacking the build myself ...
Compared to the original Spring Petclinic XML and JSON Veterinarians export links are missing to the Angular versions of Spring Petclinic
spring-petclinic-server\src\main\resources\templates\index.html Line 18,
<script th:src="@{/jquery/dist/jquery.min.js}"></script> will not be found when rendering
It takes very very long time to start the local host with "waiting local host" message on the browser. It shows either blank page or couple links with no css applied.
After an Owner update, a pet add, a visit update and a pet update, the user is redirected to the owners table? He should stay on the Owner details view.
When i download and run using default DB (HSQLDB) there is a database error and blank page is there
Data base configurations for mysql in read me files are unclear.
Please help me to configure mysal
The spring.jpa.open-in-view Spring Boot property has been added while Spring Boot 2.0.0-RC1 upgrade
The method initCreationForm both adds pet to model and returns createOrUpdatePetForm. Early debugging seem to show this method is not invoked. Could this be something leftover from earlier version of project?
Setting active class to nav menu from twitter bootstrap is not working.
There are 2 issues:
Validation on server side has been removed in the Angular version.
PetValidator is disabled. You may save a pet with an empty name despite the @SiZe(min = 1) String name on PetRequest inner class. You may do a test :
curl -H "Content-Type: application/json" -X PUT -d '{"id":1,"name":"","birthDate":"2010-09-07","typeId":"1"}' http://localhost:8080/api/customer/owners/1/pets/1
More over, duplicate names are not handled.
Check the Spring Petclinic ReactJS version. Errors are correctly handled: https://github.com/spring-petclinic/spring-petclinic-reactjs
See classes: InvalidRequestException, ApiExceptionHandler, ErrorResource, FieldErrorResource
Hi, first of all thanks for your project, we use it as our showcase for APIs and it is really helpful. Our tool provides security solutions for REST APIs, the more REST principles it follows the easier is to integrate with our tool. We were able to integrate your application but it requires some modifications/configurations and I was wondering if it could be possible to have them fixed, we can even help you on that with a pull request if you want.
The modifications that we are speaking two silly things, REST best practices recommends to use plural nouns for resources, in your project you use:
/owner/*/pet/{petId}
/owner/{ownerId}
And at the same time:
/owners/{ownerId}/pets/{petId}
Is it possible to change them? (the second names would be better but at least they should be the same). Another interesting question is, is the any reason to use weak typing in methods like
@GetMapping("/petTypes")
Object getPetTypes() {
return clinicService.findPetTypes();
}
Wouldn't it be better defined as:
@GetMapping("/petTypes")
Collection<PetType> getPetTypes() {
return clinicService.findPetTypes();
}
Thanks in advance, if you need our assistance just let us know :)
During startup I get the warning that the hsqldb jdbc driver was not found:
2017-08-15 18:18:19.884 WARN 33322 --- [ restartedMain] com.zaxxer.hikari.util.DriverDataSource : Registered driver with driverClassName=org.hsqldb.jdbcDriver was not found, trying direct instantiation.
afterwards I got an empty page
The version of the plugin
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
</plugin>
is not set into the pom.xml of the client project.
So the last version (1.4) is used during the build and the build doesn't work anymore.
[INFO] --- frontend-maven-plugin:1.4:gulp (gulp build) @ spring-petclinic-client ---
[INFO] Running 'gulp ' in /Users/francois/Travail/kbl/tools/intellij/code/spring-petclinic-angular1/spring-petclinic-client
[ERROR] module.js:327
[ERROR] throw err;
[ERROR] ^
[ERROR]
[ERROR] Error: Cannot find module '/Users/francois/Travail/kbl/tools/intellij/code/spring-petclinic-angular1/spring-petclinic-client/target/node_modules/gulp/bin/gulp'
[ERROR] at Function.Module._resolveFilename (module.js:325:15)
[ERROR] at Function.Module._load (module.js:276:25)
[ERROR] at Function.Module.runMain (module.js:441:10)
[ERROR] at startup (node.js:139:18)
[ERROR] at node.js:974:3
[INFO] -----------------------
[INFO] Spring Petclinic :: AngularJS Client ............... FAILURE [ 10.551 s]
[INFO] Spring Petclinic :: Spring MVC REST server ......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.423 s
[INFO] Finished at: 2017-04-11T09:35:27+02:00
[INFO] Final Memory: 18M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:gulp (gulp build) on project spring-petclinic-client: Failed to run task: 'gulp ' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
Set the version to 1.3 fix the build for now.
eirslett/frontend-maven-plugin#586
Regards,
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.