peholmst / vaadin4spring

Vaadin integration for Spring and Spring Boot
Apache License 2.0
266 stars 131 forks source link

Create a simple JPA CRUD example app #77

Open mstahv opened 10 years ago

mstahv commented 10 years ago

This would be good for beginners and evaluators. Best would be to push this to Springs own examples as well.

pwangsom commented 10 years ago

Dear Sir,

I am new both vaadin and spring. Thankfully, this add on helps me to understand both frameworks. I have some issues, however, which I need to clarify for better understand. I can run vaadin app smoothly if I put the extended UI class the same package as application class. Vaadin app will run failed, on the other hand, if I put the extended UI class and application class on different packages. Is this normal case or I do something wrong?

Best regards, Peerasak

mstahv commented 10 years ago

Hi,

A very simple JPA CRUD example is here: https://github.com/mstahv/spring-data-vaadin-crud

But I think your issue is real. Vaadin UIs are detected only from the same or sub packages, related to the configuration class. If in the above project you move the Application class to "crud.springboot" package, the Vaadin UI is not found. Not sure though if it is by design or not. Josh or Petter can answer that.

pwangsom commented 10 years ago

Hi, Thank you for your answer and the excellent example. I'm looking for guidance using Spring JPA with Vaadin. Your example let me more understand to start up learning. I may have more questions about Spring JPA and Vaadin integration later. I may bother you in this forum again.

Thanks

gjrtimmer commented 9 years ago

@peholmst Suggestion: Import the mentioned sample within the vaadin4Spring samples?

mstahv commented 9 years ago

I could try to polish it a bit some day, add some simple example of a relation handling as well and push it in as simple-jpa-crud-example. Petter any opinions?

gjrtimmer commented 9 years ago

@mstahv Would it be possible to create a branch from your master purely for the import into Vaadin4Spring. Could you already import the license header of vaadin4spring into every Java file ?

peholmst commented 9 years ago

@mstahv Go ahead!