и посмотреть медиа
Java | Interview questions
и посмотреть медиа
Questions and answers for Java developer interviews.
Questions and answers for Java developer interviews.
AI bot for text-to-speech and voice cloning in Telegram. Create audio using neural network quickly and easily.
Selection of typical questions in Java interviews: from JVM basics to Spring and Hibernate. Each question with detailed explanation, code examples, and tips. Suitable for all levels.
🤔 В чем разница между request mapping и put mapping? Главное отличие: @RequestMapping – универсальная аннотация, поддерживающая все HTTP-методы (GET, POST, PUT, DELETE и т. д.). @PutMapping – специализированная аннотация для PUT-запросов. 🚩`@RequestMapping` – универсальная аннотация Можно использовать для любого HTTP-метода (GET, POST, PUT, DELETE). Необходимо явно указывать method = RequestMethod.PUT, если нужен PUT. @RestController @RequestMapping("/users") public class UserController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT) public String updateUser(@PathVariable Long id, @RequestBody String userData) { return "Пользователь с ID " + id + " обновлён!"; } } 🚩`@PutMapping` – упрощённый способ для `PUT`-запросов Это специализированная аннотация, эквивалентная @RequestMapping(method = RequestMethod.PUT). @RestController @RequestMapping("/users") public class UserController { @PutMapping("/{id}") public String updateUser(@PathVariable Long id, @RequestBody String userData) { return "Пользователь с ID " + id + " обновлён!"; } } Ставь 👍 и забирай 📚 Базу знаний
Открыть канал и посмотреть медиаOnly registered users can share their opinion.
Be the first to share your impression of this resource!