- This topic has 8 replies, 2 voices, and was last updated 14 years, 3 months ago by davemeurer.
-
AuthorPosts
-
dav0MemberI am a Skyway Builder EE subscriber who is enjoying his exploration thusfar into the M2 beta release of My Eclipse For Spring (ME4S).
I wanted to try my luck at extending a layer of Spring Security to the CusomersApp Spring Scaffolding tutorial using the “Scaffold Spring Security” feature.
Ideally, I’d like to implement OpenId, so to that end, I am choosing to follow the “In-Memory” option as described on Niel Eyde’s tutorial page :
I thought I’d use this post to kind of document my experience, as I am hitting a few bumps along the way on this exercise, but so far I seem to be discovering workarounds. I will plan to post these experiences in follow-up replies if this is OK.
Thanks!
David McLure
dav0MemberAfter successfully completing the Spring Scaffolding tutorial using all of the implementations available (like they did in the movie), the next thing I tried was to Enable the Spring DSL feature.
Of course, the first problem I encountered was to discover that the tutorial incorrectly named this feature “MyEclipse–>Add Spring Code Generation Capabilities…”, when in M2 it has been renamed to “MyEclipse–>Spring DSL–>Enable Spring DSL…”
dav0MemberAfter enabling Spring DSL (as described in the first reply), I decided to try the feature from a right-click on my project called “Spring Code Generation–> Update Spring DSL from Source”
When I attempted executing this feature however, I recieved the following error pop-up message :
“Your license does not cover this operation.
Operation id: com.skyway.integration.java.spring.codetomodel.project
Please contact Genuitec support”So, I shrugged my shoulders and figured that maybe this feature wasn’t enabled in the 30-day evaluation version. But then I noticed that after clicking OK on this error, there were no longer *any* Spring features on my menu!
I had to restart MyEclipse to reset everything back to normal.
dav0MemberAt this point, I felt that I was ready to add Spring Security to the project, so I right-clicked on my project and selected “MyEclipse–>Scaffold Spring Security”
Oddly enough, after clicking through the first introductory screen, the next screen was displaying a folder with my project and a SpringDSL sub-folder, with no instructions or obvious clues as to what to do next – other than the words “Select Package”.
When I finally started poking around and clicked on my project folder, I got an error message just under the “Select Package” text saying “Must select a package within a project”, but there were still no packages to select, nor were there any clues.
I cancelled out of this dialog, and decided to try “MyEclipse–> Spring DSL–> Update Spring DSL from Source” and got a “Your java files were processed successfully” message pop-up.
This time, when I went in and selected “MyEclipse–>Scaffold Spring Security” I was presented with org, org.customerapp, org.customerapp.domain, org.customerapp.service, and org.customerapp.web packages to enable.
Note: I still have not been presented with the Security Options page, as is documented in step #3 of the tutorial, so I appear to have veered off course somehow. I will proceed based on intuition to see how far I get, but feel free to post a reply to this reply with more clues if you want.
davemeurerMemberHi David,
Thanks for posting your feedback! It’s definitely appreciated. A couple items to note:
Regarding the license exception: From the code history, it looks like we’ve updated the operation ids since M2. I just checked the same feature and all works ok on the GA branch. In terms of what that feature actually does: Update Spring DSL from Source runs the reverse engineering process to (s) update pre-existing Spring DSL artifacts from updates made to Java code or (b) create new Spring DSL artifacts from the Java source files. When a project has the Spring DSL enabled, there is an Eclipse builder that monitors code changes in the project and automatically keeps the Spring DSL in sync. However there may be occasions where you want to force the synchronization (i.e. changes made outside of Eclipse).
Regarding Spring Security:
Since M2, we’ve actually made quite a few enhancements to Security Scaffolding. I don’t want to state that to prevent you from communicating your feedback, just want to let you know enhancements are on the way – like the folder issue you are seeing.Kind regards,
Dave
dav0MemberThis makes sense.
I’ll hold off until GA then as it looks to be out very soon I think (hope).
Thanks!
Dave
dav0MemberI was able to install the ME4S 8.6 update via Pulse using the Software and Workspace Perspective just now.
Restarting Eclipse and retrying to “MyEclipse–> Scaffold Spring Security” I am back to the same place I was before. Basically, it is asking me to “Select the destination for Spring Security scaffolding” and I now have a list of possible packages to place these artifacts – just as before – none of which is really mentioned anywhere in the Tutorial.
Recall that I was seeing this page before, but there were no package options to choose from. It wasn’t until I tried doing a “Spring Code Generation–> Update Spring DSL from Source” that I even began to see packages to choose from in this step.
At first I thought that I might have somehow veered off course from the standard demo at some point, so I started over with a brand new Web Project and redid the “Scaffold Spring CRUD Application from…” from scratch, but I still get the same results.
Could it be that the “Scaffold Spring Security” Tutorial web page is not yet updated with the latest 8.6 code pages?
Or did I possibly introduce a new paradigm to all future Spring Security Scaffolding projects when I enabled Spring DSL on my first project?
Thanks
David McLure
dav0MemberWell, I went back to my Skyway Builder tutorials and managed to refresh my memory on this a little. There is a video that talks about the Spring Security Scaffolding in Skyway Builder, and it was enough to at least get me some basic best practice advice around where to place the Spring Security Artifacts. Of course, they could be placed anywhere, but apparently the recommendation is to first create a directory under your domain model directory called “security” and then run the Spring Security scaffolding and choose this directory.
See the following U-tube video for more ideas on this : http://www.skywayperspectives.org/skywaytv/?p=59
davemeurerMemberHi David,
Thanks again for documenting your experiences. I have a couple notes to follow up:
1. When Security Scaffolding with the Database option, one of the new enhancements with 8.6 is that you can now type in a new package in that wizard pane, instead of needing to create the package before going into the wizard.
2. The main Security Tutorial we are going to publish (and the one in the MyEclipse Help) focuses on In Memory Security Scaffolding, which doesn’t detail that pane. We have an LDAP Security video that will be published today at youtube.com/myeclipseforspring. We will need to update the Database Security Scaffolding option here shortly.
Kind regards,
Dave -
AuthorPosts