Announcement Announcement Module
No announcement yet.
HWOTO use a Sample? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 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?

  • #2
    Try File -> New -> Spring Template project. You can also click on the spring template project link on the dash board:

    Attached Files


    • #3
      yes, I know how to create a project, I don't know how to consume the samples that are downloadable from this web site.


      • #4
        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.


        • #5
          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:

          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.


          • #6
            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)
            4. Restart
            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.