SPRING BOOT | How to delete data from MySQL database with REST API in Java Spring Boot

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 6

  • @ECNISHOKAP
    @ECNISHOKAP 29 дней назад +1

    Thanks bro for this whole springboot videos..👌💖

  • @darkmessiah8087
    @darkmessiah8087 22 дня назад

    it enabled me to solve my problem, thank you very much !

  • @nikhil4yourhelp670
    @nikhil4yourhelp670 5 месяцев назад

    When we deleted the record and then add another record the I'd is not the next number of present record it is next of deleted record .

  • @amitchaurasia592
    @amitchaurasia592 8 месяцев назад

    What happen in case you want delete the data which is not present, can you please tell how you can handel those case

    • @SharmaCoder
      @SharmaCoder  8 месяцев назад +1

      You can check if the requested record exists in db, and then add an if condition if the record exists else return 404

  • @songjun7122
    @songjun7122 Год назад

    @Bean
    public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
    http.csrf().disable()
    .authorizeHttpRequests((authorize) ->
    authorize.requestMatchers("/register/**").permitAll()
    .requestMatchers("/").permitAll()
    .requestMatchers("/users").hasRole("ADMIN")
    .requestMatchers(HttpMethod.DELETE,"/users/delete/**").hasRole("ADMIN")
    It gives me Error 403 when I include Spring Security although i login as admin, can you help me?