Feb 1st, 2013, 08:43 AM
HWOTO use a Sample?
I come from a 17 year background in the Microsoft stack. Thanks to my company being purchased by a Java shop, I am working on learning both Java and Spring. Currently I have STS 2.8 install (that is what my parent company uses).
I love the fact that there are a ton of samples here at springsource.org, the problem is I don't know what to do with them. I have tried to download the spring-data-jpa-examples zip file and then importing it into my STS workspace, but STS keeps saying that there is no project. I saw that there where some sub folders, so I tried to import those, same thing.
Can anyone enlighten me as to the correct Spring Source recommended way of importing the samples into a workspace so I can start really digging into them?
Feb 1st, 2013, 10:49 AM
Try File -> New -> Spring Template project. You can also click on the spring template project link on the dash board:
Feb 1st, 2013, 11:07 AM
yes, I know how to create a project, I don't know how to consume the samples that are downloadable from this web site.
Feb 1st, 2013, 12:50 PM
I forgot to mention that our template projects have been completely overhauled for STS 3.0.0. We now have many more templates available. If at all possible, I'd recommend upgrading to 3.1.0 or later.
But, perhaps I'm not understanding what you are trying to do. Are you looking for the raw text of the template projects?
Here are some urls that STS for 3.0.0 and later uses for its template locations:
From here, you can download the raw zips for the projects. These zips contain maven projects that you can import into STS through m2e (the maven plugin for Eclipse). But, really, things are much smoother if you can import them directly thorugh STS 3.0.0 or later.
Feb 1st, 2013, 12:55 PM
No, I am not trying to create a template, I am trying to get something from this page to load into STS as a project:
The specific one I tried was this one: https://github.com/SpringSource/spri...a-jpa-examples
All in all, I am seeking a bit more help then: "ok here is source code, go!" There are some of us with years of experence in developing code that simply don't get the ecosystem of Eclipse/STS. It would be wonderful if there was a HOWTO Get Samples Running for STS/Eclipse dummies.
Feb 1st, 2013, 01:34 PM
Really, the recommended way to start with Spring projects is to use a template project (preferable from STS 3.0.0 or later).
Some of the projects listed on samples are using older versions of spring, but the ones available as template projects are all up to date.
But the link that you are looking at is fairly recent and it doesn't seem to be available as a template. Just clone the repo and then import the project as a maven project:
File -> New -> Maven -> Existing maven project.
If you think you will be doing this a lot, then you can avoid the explicit cloning processL
1. File -> New -> Maven -> Checkout Maven projects from SCM
2. Click on m2e market place link at the bottom
3. Select m2e-egit to install (would be nice if this were included in STS by default, but it's not)
5. Now when you go to File -> New -> Maven -> Checkout Maven projects from SCM, you will be able to choose git:// as the url
6. In the github page select the clone url and paste it into the wizard.