You need to implement the methods in the MappingsResolver class that will extract and return various types of mappings from a given method and controller class. Specifically, you will complete the following methods:
These methods should analyze the provided method and controller to retrieve mapping information defined by annotations such as @RequestMapping and related annotations.
Input/Output Requirements:
Input:
Method method: A Java Method object representing the method from which to extract mappings.
Class<?> controller: A Java Class object representing the controller class associated with the method.
Output:
Each method should return a List<String> containing the mapping declarations extracted from the annotation parameters of the specified method and controller.
If no mappings are found, the method should return an empty list.
Implementation Instructions:
Implement the getMessageMappings method to extract message mappings from the provided method and controller.
Implement the getSubscribeMappings method to extract subscription mappings from the provided method and controller.
Ensure all mappings are handled consistently, and the results are returned in a unified format.
Location:
Place the implementation of the methods in the MappingsResolver class located in the /app/ directory.