SpringBoot and EclipseScout [message #1748176] |
Sun, 20 November 2016 06:24  |
Eclipse User |
|
|
|
Hi there,
I just cloned the SpringBoot-and-EclipseScout POC and had a look at it.
I like the possibility to use the Scout UI and Spring Boot together very much. Mainly because Spring (Boot) JPA doesn't require to write cumbersome and error prone SQL statements.
But looking at the sample code a few questions came up:
- Can I still use the possibility of the @RestController? Because in the code there is the TaskController which has a @RequestMapping(ScoutServletConfig.SERVICES_PATH + "/tasks"). But invoking localhost:8080/api/tasks throws an error because it's not found. Any idea why? Has it something to do with the ScoutServletConfig? Althoug during startup it says: Mapped "{[/api/tasks || /api/tasks/]}" onto public java.util.Collection...
- Why are there two Objects used? E.g. Task and TaskEntity? Isn't it possible to use just one Task (DTO)-Object throughout the whole code? At the moment values from Task are copied to TaskEntity and vice versa and then copied to the according form model. Why?
- Would it possible to use a multi-module project setup? Right now it's just one project, which covers all. What would the configuration look like, if I'd like to split the project into several small sub projects?
- When using Spring (Boot) JPA combined with the Scout UI Layer, right now the values from DTO have to be copied manually to the form beans. Is there also some kind of generic way to achieve this?
- How can LookupCalls be implemented when using Spring (Boot) JPA?
Thanks in advance
Peter
[Updated on: Sun, 20 November 2016 13:17] by Moderator
|
|
|
|
Re: SpringBoot and EclipseScout [message #1748207 is a reply to message #1748199] |
Mon, 21 November 2016 03:46   |
Eclipse User |
|
|
|
Hi,
Matthias Zimmermann wrote on Mon, 21 November 2016 08:09
first some overall remarks regarding the combination of Spring Boot and Scout:
- this is still work in progress, after accepting a pull request some things have to be fixed again and some things are now much nicer 
- the goal is to have a sample repo by the end of the year that can be seen as "best practice" from both the Scout and the Spring perspective
- an additional goal is to create a maven archetype for the Scout/SpringBoot combination
That sounds very good. I'm looking forward seeing such a best practice example.
Matthias Zimmermann wrote on Mon, 21 November 2016 08:09
(a) @RestController: it is definitively the idea that this works
Should this work already? Because I just get an 404 error (mapping not found) and a breakpoint there isn't invoked either.
Matthias Zimmermann wrote on Mon, 21 November 2016 08:09
(c) Why no multi-module project?: this is open for debate too. so far we came to favor a single-module approach for the following reasons: for smaller apps creating a multi-module application creates is overkill, for developers with a SpringBoot background the setup more closely matches the Spring hello world setup
I agree. For smaller projects it's more than sufficient. But nevertheless an example you how a multi-module project setup would look like, would be very cool.
Matthias Zimmermann wrote on Mon, 21 November 2016 08:09
(d) Why a manual copy from JPA objects to form beans?: no reason so far, what is your recommendation to use instead (simpler approaches with fewer dependencies are more favorable ...)
Would tools like ModelMapper be a valid approach here?
Matthias Zimmermann wrote on Mon, 21 November 2016 08:09
(e) LookupCalls and SpringBoot JPA: we will try to come up with example for that
Yes please. That would be wonderful.
I started to migrate my RAP based Scout Project to Scout/SpringBoot this weekend by copying your sample project and adjusting it to my needs. My deadline for this new version is spring 2017. So there is no need to hurry and I'll keep an eye on the git regulary. But I'd be more than happy if the Scout/SpringBoot path would be pushed forward as far as and as quick as possible.
Thanks
Peter
[Updated on: Mon, 21 November 2016 03:47] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: SpringBoot and EclipseScout [message #1754844 is a reply to message #1754770] |
Thu, 23 February 2017 01:25   |
Eclipse User |
|
|
|
Hi Michael,
thanks that helped... BUT 
I tried to migrate and adapt all the files - which you have changed in your example project - in my small test project. And now I get this exception during application startup:
Config property with key 'scout.auth.permission.exclude' does not exist or has an invalid value.
I changed my config.properties according to yours:
scout.auth.permission.exclude=\
org.eclipse.scout.rt.shared.security.CreateGlobalBookmarkPermission,\
org.eclipse.scout.rt.shared.security.ReadGlobalBookmarkPermission,\
org.eclipse.scout.rt.shared.security.UpdateGlobalBookmarkPermission,\
org.eclipse.scout.rt.shared.security.DeleteGlobalBookmarkPermission,\
org.eclipse.scout.rt.shared.security.CreateUserBookmarkPermission,\
org.eclipse.scout.rt.shared.security.ReadUserBookmarkPermission,\
org.eclipse.scout.rt.shared.security.UpdateUserBookmarkPermission,\
org.eclipse.scout.rt.shared.security.DeleteUserBookmarkPermission,\
org.eclipse.scout.rt.shared.security.PublishUserBookmarkPermission,\
org.eclipse.scout.rt.shared.security.CreateCustomColumnPermission,\
org.eclipse.scout.rt.shared.security.UpdateCustomColumnPermission,\
org.eclipse.scout.rt.shared.security.DeleteCustomColumnPermission,\
org.eclipse.scout.rt.shared.security.ReadDiagnosticServletPermission,\
org.eclipse.scout.rt.shared.security.UpdateDiagnosticServletPermission,\
org.eclipse.scout.rt.shared.security.RemoteServiceAccessPermission,\
org.eclipse.scout.rt.shared.security.UpdateServiceConfigurationPermission,\
Bit it seems that I missed something (again)... Can you please point me to the right direction?
Does the attached pom.xml help?
Thx
Peter
Attachment: pom.xml
(Size: 5.53KB, Downloaded 203 times)
[Updated on: Thu, 23 February 2017 01:29] by Moderator
|
|
|
|
|
|
|
|
|