Announcement Announcement Module
Collapse
No announcement yet.
STS configuration with java project in eclipse Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Did you add the Spring project nature? Go to your project. Right click -> Spring Tools -> Add spring project nature.

    Comment


    • #3
      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?

      Comment


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

        Comment


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

          Comment


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

            Comment


            • #7
              The bug logged is available in the below url:

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

              Comment


              • #8
                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, 06:40 PM.

                Comment


                • #9
                  I'll have someone look at this.

                  Comment

                  Working...
                  X