@Controller @RequestMapping(value="/maps") public class MapController<E extends Map,D extends MapDao<E>,S extends MapService<E,D>> extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
COULD_NOT_SET_ERROR_MSG |
protected S |
service |
| Modifier | Constructor and Description |
|---|---|
|
MapController()
Default constructor, which calls the type-constructor
|
protected |
MapController(Class<E> type)
Constructor that sets the concrete type for this controller.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
setLayersForMap(Integer mapModuleId,
List<Integer> layerIds)
Set layers for map
|
void |
setService(S service)
We have to use
Qualifier to define the correct service here. |
public static final String COULD_NOT_SET_ERROR_MSG
protected S extends MapService<E,D> service
public MapController()
@Autowired @Qualifier(value="mapService") public void setService(S service)
Qualifier to define the correct service here.
Otherwise, spring can not decide which service has to be autowired here
as there are multiple candidates.@RequestMapping(value="/setLayersForMap.action",
method=POST)
@ResponseBody
public Map<String,Object> setLayersForMap(@RequestParam(value="mapModuleId")
Integer mapModuleId,
@RequestParam(value="layerIds")
List<Integer> layerIds)
mapModuleId - The map module idlayerIds - The list of layer idsCopyright © 2020 terrestris GmbH & Co. KG. All rights reserved.