29 lines
708 B
Java
29 lines
708 B
Java
package ru.soune.nocopy.configuration;
|
|||
|
|
|
||
|
|
import org.springframework.context.annotation.Bean;
|
||
|
|
import org.springframework.context.annotation.Configuration;
|
||
|
|
import ru.soune.nocopy.handler.*;
|
||
|
|
|
||
|
|
import java.util.HashMap;
|
||
|
|
import java.util.Map;
|
||
|
|
|
||
|
|
@Configuration
|
||
|
|
public class HandlerConfig {
|
||
|
|
|
||
|
|
@Bean
|
||
|
|
public Map<Integer, RequestHandler> handlers(
|
||
|
|
RegRequestHandler reg,
|
||
|
|
LoginRequestHandler login,
|
||
|
|
FileUploadHandler upload,
|
||
|
|
FileEntityHandler file
|
||
|
|
) {
|
||
|
|
Map<Integer, RequestHandler> map = new HashMap<>();
|
||
|
|
map.put(20001, login);
|
||
|
|
map.put(20002, reg);
|
||
|
|
map.put(20004, upload);
|
||
|
|
map.put(20005, file);
|
||
|
|
|
||
|
|
return map;
|
||
|
|
}
|
||
|
|
}
|