Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8083023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:19:26+00:00 2026-06-05T17:19:26+00:00

I am new to Spring and ROO and this Annotation/Aspect hell. I have an

  • 0

I am new to Spring and ROO and this Annotation/Aspect hell.

I have an Spring MVC Project created with Spring ROO.
I use mongo-db as my persistance layer.
I have an entity Report with the domain object, the service, the repository and the controller.
I added a custom controller wich workes so far.
I want to just access my stored reports with the ReportService.findAllReports(), but I’m not sure how to get access to this service.

Here is a link to my roo generated site http://sauberseite.cloudfoundry.com/

The main objective is to report adresses and then display all adresses in a google map, for which I have my custom controller and where I need to access the service layer

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:19:28+00:00Added an answer on June 5, 2026 at 5:19 pm

    You can directly @Autowired it as follows.

    @Controller
    public class CustomController {
        @Autowired
        ReportService reportService; //this inject's your bean here.
    
        List<Report> getReports() {
            return reportService.findAllReports();
        }
    }
    

    If you don’t use annotation @Controller and defined your bean in xml, then you can inject ReportService as a property (just remove @Autowired annotation) and write a setter for it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to spring mvc and spring projects. I've created new spring roo project.
I am new to spring MVC. i have below project structure. Below are classes:
I have to start a new Spring MVC project and I've been reading about
I am new to spring mvc and have seen examples where folks use @ModelAttribute(form)
I am new to Spring MVC . I have a web application. I have
I have created a many to many mapping in spring roo between two entities
Trying to set up a new spring project and im having this issue where
I´m new in spring-mvc. So, i´m trying to use RESTFull urls ( i think
I have been trying out the new Spring MVC 3.0 Type Conversion Framework. I
I'm new to spring mvc, roo and hibernate. I'm using Oracle XE 10g database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.