Anh ơi cho em hỏi,
Nếu mình muốn điều phối request bên trong Spring có chủ đích, kiểu như lọc những request có url bắt đầu với “/custom”, cắt lấy phần còn lại, và chuyển request đó đến controller có api tương ứng, thì làm sao ạ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Anh đang hình dung là em muốn lọc api để phục vụ cho mục đích phân quyền đúng không em?
Dạ không ạ, ý em muốn như kiểu, nếu em tạo một API GET “/users” thì tự động sẽ có một API POST “/more/users” với params giống như cái GET và chức năng như GET, nhưng cho phép thêm body.
Theo hiểu biết hiện tại thì Spring chưa có khả năng làm vậy em ạ, nó mới chỉ có chức năng cao cấp nhất là mapping url theo regex, và nó không liên quan gì đến cái em nói em ạ.
dạ em cảm ơn anh