Bonjour à tous, j'essaye de faire un Use Case dans une application. Malheureusement, je n'arrive à afficher que la liste des Buildings OU la liste des Rooms. Lorsque j’exécute Maven, j'ai le message d'erreur suivant:

Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'adminController' bean method
public java.lang.String org.sio.jnetmap.web.AdminController.index1(org.springframework.ui.ModelMap)
to {[/uc/admin/**],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'adminController' bean method


Voici, un extrait de mon controller.

package org.sio.jnetmap.web;

import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.sio.jnetmap.domain.Building;
import org.sio.jnetmap.domain.Room;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@RequestMapping("/uc/admin/**")
@Controller
public class AdminController {

@RequestMapping(method = RequestMethod.POST, value = "{id}")
public void post(@PathVariable Long id, ModelMap modelMap, HttpServletRequest request, HttpServletResponse response) {
}

@RequestMapping
public String index(ModelMap modelMap) {
List<Room> rooms = Room.findAllRooms();
modelMap.addAttribute("rooms", rooms);
modelMap.addAttribute("roomsCount", rooms.size());
return "uc/admin/index";
}

@RequestMapping
public String index1(ModelMap modelMap) {
List<Building> buildings = Building.findAllBuildings();
modelMap.addAttribute("buildings", buildings);
modelMap.addAttribute("buildingsCount", buildings.size());
return "uc/admin/index";
}
}