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 9198041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:11:51+00:00 2026-06-17T22:11:51+00:00

I have the following: @Controller @RequestMapping(/admin) public class AdminController extends BaseHtmlController{ @Autowired protected DeviceCustomerMap

  • 0

I have the following:

@Controller
@RequestMapping("/admin")
public class AdminController extends BaseHtmlController{

    @Autowired
    protected DeviceCustomerMap deviceCustomerMap;

    @Autowired
    protected CustomerDao customerDao;

    String layout = "template/admin";

    @RequestMapping(value="/login", method = RequestMethod.GET)
    public String login(ModelMap model) {
        model.addAttribute("meta", meta);
        String view = "login";
        return view;
    }


}


public class AdminCustomerController extends AdminController{

    @RequestMapping(value="/customer/mapping", method = RequestMethod.GET)
    public String customerMapping(ModelMap model, @RequestParam(required=false) boolean refresh) throws Exception {
        if (refresh){
            deviceCustomerMap.initCustomerUrlMap();
        }
        model.addAttribute("meta", meta);
        model.addAttribute("view", "customer/mapping");
        model.addAttribute("customers", deviceCustomerMap.getCustomerMap());
        return layout;
    }
}

However, the extended controller doesn’t resolve the requests, but when they’re in the base controller, they’re resolved just fine, I’ve poked around several threads but couldn’t find a solution, any idea?

  • 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-17T22:11:52+00:00Added an answer on June 17, 2026 at 10:11 pm

    Is the problem that you are able to get a response when executing a request to the /admin/login resource, but not to /admin/customer/mapping resource, unless you move the customerMapping() method to the AdminController class?

    The solution is to annotate the AdminCustomerController class with the @Controller annotation. Without a stereotype annotation (and appropriate component scanning), Spring will not recognise the class as a Spring bean.

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

Sidebar

Related Questions

I have the following controller: class Tests extends CI_Controller { public function update_record_test() {
I have the following controller @Controller @RequestMapping(/project/view.html) public class ProjectViewController { private static final
I have written the following code : @Controller @RequestMapping(/test) public class Home { @RequestMapping(value
Hi I have the following code: Controller: @Controller public class HelloWorldController { @RequestMapping(/hello) public
I have the following controller: public ActionResult Search(string Name, int? Friend, int? Page) It
In Spring MVC I have the following controller: @RequestMapping(value=adminUsers, method = RequestMethod.POST) public ModelAndView
I have the following setup in my controller.. @RequestMapping(value=/security_param, method=RequestMethod.GET) public @ResponseBody BigInteger getSecurityParam(){
I have the following GET request in my controller: @Controller public class TestController {
I have the following pojo: public class Foo { @Size(min=0,max=10) private String bar =
I have the following controller mapped as @Controller( value = stockToStoreController ) @RequestMapping(/stsr) public

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.