2025-12-18 01:13:19 +07:00
|
|
|
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,
|
2025-12-21 16:19:12 +07:00
|
|
|
FileEntityHandler file,
|
2025-12-22 14:07:44 +07:00
|
|
|
LogoutRequestHandler logoutHandler,
|
2026-01-20 03:47:51 +07:00
|
|
|
ImageFoundRequestHandler imageFoundRequestHandler,
|
2026-01-21 12:02:38 +07:00
|
|
|
VerifyRegisterUserHandler verifyRegisterUser,
|
2026-01-29 19:24:36 +07:00
|
|
|
AuthRequestHandler authRequestHandler,
|
2026-02-02 15:00:18 +07:00
|
|
|
CompanyHandler companyHandler,
|
2026-02-02 15:47:58 +07:00
|
|
|
TariffHandler tariffHandler,
|
|
|
|
|
TariffInfoHandler tariffInfoHandler
|
2025-12-18 01:13:19 +07:00
|
|
|
) {
|
|
|
|
|
Map<Integer, RequestHandler> map = new HashMap<>();
|
|
|
|
|
map.put(20001, login);
|
|
|
|
|
map.put(20002, reg);
|
|
|
|
|
map.put(20004, upload);
|
|
|
|
|
map.put(20005, file);
|
2025-12-21 16:19:12 +07:00
|
|
|
map.put(20006, logoutHandler);
|
2025-12-22 14:07:44 +07:00
|
|
|
map.put(20007, imageFoundRequestHandler);
|
2026-01-05 16:31:40 +07:00
|
|
|
map.put(20008, authRequestHandler);
|
2026-01-20 03:47:51 +07:00
|
|
|
map.put(20009, verifyRegisterUser);
|
2026-01-29 19:24:36 +07:00
|
|
|
map.put(30000, companyHandler);
|
2026-02-02 15:00:18 +07:00
|
|
|
map.put(30001, tariffHandler);
|
2026-02-02 15:47:58 +07:00
|
|
|
map.put(30002, tariffInfoHandler);
|
2025-12-18 01:13:19 +07:00
|
|
|
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
}
|