Results 1 to 9 of 9

Thread: STS configuration with java project in eclipse

  1. #1
    Join Date
    Mar 2010
    Location
    USA
    Posts
    119

    Default STS configuration with java project in eclipse

    Can any one please help me with setting up the STS for my project. I have a java project configured in eclipse. It has spring config files. I use annotations all over. so the beans are automatically scanned and created. I have only a few beans in the xml files.

    I downloaded STS as plugin and am trying to see the @RequistMappings window view and spring explorer view - They are blank.

    Please help me. this is driving me crazy

  2. #2
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    747

    Default

    Did you add the Spring project nature? Go to your project. Right click -> Spring Tools -> Add spring project nature.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  3. #3
    Join Date
    Mar 2010
    Location
    USA
    Posts
    119

    Default

    Thanks you so much for responding!

    Actually i was about to update this thread, On adding the spring nature, i was able to get the explorer view. But still am stuck with @RequistMappings view. This is blannk. I have annotated request mapping in my controller. I expect them to appear in this window -is that right?

  4. #4
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    747

    Default

    Select one of the xml files in the Spring explorer and there is a "Show Request Mappings" command in the context menu. That should populate the Request Mappings view. If that's not working for you, please file a bug here:

    https://issuetracker.springsource.com/browse/STS
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  5. #5
    Join Date
    Mar 2010
    Location
    USA
    Posts
    119

    Default

    I right clicked in each of the xml file. there in the menu that comes up I went and clicked the @Requestmappings view - Nothing comes up!

    Am really not sure whether am missing something. However as per what you suggested, I shall file the issue in the tracker and attach screenshots

  6. #6
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    747

    Default

    Wish I had a better answer for you. I just spoke with the developer who implemented that view and he said that there might be some situations where it does not work. It would help reproducibility if you could include some of your RequestMappings. Thanks.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  7. #7
    Join Date
    Mar 2010
    Location
    USA
    Posts
    119

    Default

    The bug logged is available in the below url:

    https://issuetracker.springsource.com/browse/STS-894

  8. #8
    Join Date
    Mar 2010
    Location
    USA
    Posts
    119

    Default

    Quote Originally Posted by Andrew E View Post
    Wish I had a better answer for you. I just spoke with the developer who implemented that view and he said that there might be some situations where it does not work. It would help reproducibility if you could include some of your RequestMappings. Thanks.
    Here is the controller code with request mappings. I have also added this attachment to the bug report. Please if possible let me know when it is resolved( if possible only)

    Code:
    @Controller
    public class EmployeesController {
    
      @Autowired
      private Service service;
    
      @RequestMapping("/employeeList.html")
      @ModelAttribute("employee")
      public String getEmployees(Model model) {
        List<Employee> listEmp =  (List<Employee>) service.getAllEmployees();
        model.addAttribute("employees", listEmp);
        HttpSession session = req.getSession(true);
        
      }
    
      @RequestMapping("/employeeDetails.html")
      public Employee getEmployee(@RequestParam(value="id", required=true) int countryId) {
    
        return service.getEmployeeById(countryId);
      }
    
    }
    Last edited by priyavenkat; Mar 30th, 2010 at 05:40 PM.

  9. #9
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    747

    Default

    I'll have someone look at this.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •