Spring Boot Auditing using Spring Data Envers | Example | Java Techie

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 82

  • @nonogour
    @nonogour 3 роки тому +2

    bravo ... life saving for a programmer

  • @siyedyoussef3202
    @siyedyoussef3202 5 років тому +2

    Great video Sir love to see more jaspertreport video Sir 👍

  • @ballikuraramu9083
    @ballikuraramu9083 2 роки тому +1

    nice bro great Explanation
    thq u so much

  • @alimasoumi5084
    @alimasoumi5084 2 роки тому +1

    Hello, thank you for great explanation

  • @abinashsahoo9389
    @abinashsahoo9389 5 років тому +1

    nice. Reduced a lot of effort of mine.. Thnks for uploaded.

  • @soumyadhali3201
    @soumyadhali3201 3 роки тому +1

    i dont open the db.there is some errors like this.
    Whitelabel Error Page
    This application has no explicit mapping for /error, so you are seeing this as a fallback.
    Fri Oct 29 13:07:32 IST 2021
    There was an unexpected error (type=Not Found, status=404).

    • @Javatechie
      @Javatechie  3 роки тому

      Unable to scan your bean .

  • @sujithg5873
    @sujithg5873 5 років тому +1

    Great work

  • @saurabhsuman4960
    @saurabhsuman4960 5 років тому

    Good content. Simple explanation. Complete understanding. Thanks a lot for your efforts 👍

  • @pdchdyoutubification
    @pdchdyoutubification Рік тому +1

    @Data annotation will add hashcode() and equals() methods along with getter setters etc , usually hashcode equals not required for entity , is there any specific reason?

    • @Javatechie
      @Javatechie  Рік тому

      No data annotation won't include hashcode and equals

  • @VenkatOnWheels
    @VenkatOnWheels 5 років тому

    Perfect video for beginners...

  • @barankaplan4308
    @barankaplan4308 Рік тому +1

    hi is it possible keep all update values ? like 4 1 - 4 2 and so on? thanks

  • @shivaniagrawal8090
    @shivaniagrawal8090 2 роки тому +1

    Thank you so much for the video, but i have one issue tables are not getting generate automatically. could you please share setting to do that

    • @Javatechie
      @Javatechie  2 роки тому +1

      Is your entity table created ?

    • @shivaniagrawal8090
      @shivaniagrawal8090 2 роки тому +1

      @@Javatechie i created table manually, it worked perfectly fine, thanks a lot for your video

    • @Javatechie
      @Javatechie  2 роки тому

      @@shivaniagrawal8090 but that is not the solution .if you added Lombok dependency did you configure in your IDE if not please do that otherwise add getter and setter method manually in your entity class

  • @mehdichaabane9803
    @mehdichaabane9803 5 років тому +1

    I have a problem with the associated entities, I used the method "findRevisions" from interface RevisionRepository, it returns me current entity and null for the associated entitie. can you help me! Thanks

    • @Javatechie
      @Javatechie  5 років тому +1

      Can you share poc in GitHub so that I can check this out

    • @mehdichaabane9803
      @mehdichaabane9803 5 років тому

      did u do something ?

  • @DenuwanHimangaHettiarachchi
    @DenuwanHimangaHettiarachchi 4 роки тому +1

    Thanks, you save my day 👍

  • @timothyarjun8901
    @timothyarjun8901 2 роки тому +1

    Is it possible to write Audit log with Rolling File handler? I didn't get any reference about it.

    • @Javatechie
      @Javatechie  2 роки тому +1

      I don't think we can do that but will check and update you

    • @timothyarjun8901
      @timothyarjun8901 2 роки тому

      Thanks for your reply

  • @divyashahi9364
    @divyashahi9364 2 роки тому +1

    After adding @audited notation to classes / entity I am not able to do any post operation

  • @sowmyarani8833
    @sowmyarani8833 4 роки тому +1

    is it possible to know which item was actually deleted ?? the example you gave book name is "null" so how we will know which one was exactly deleted ?

    • @rajasekharb7901
      @rajasekharb7901 2 роки тому +1

      Then in this case it's not possible if you do hard delete . So for that you have to implement soft delete methodology and make updatedBy as who is deleted . In this case you have to maintain history table as well throught trigger.

  • @bhavanisankar71
    @bhavanisankar71 Рік тому

    Sir I tried with service layer it's working but findLast .... method not working with response Body but it's working with console why

  • @vigneshbalachandran9704
    @vigneshbalachandran9704 3 роки тому +1

    What if I have one table which is related to 4 tables... Like one to many kind of mapping.. How revision works here

    • @Javatechie
      @Javatechie  3 роки тому

      I didn't check but I believe approach is same

  • @balakrishna7078
    @balakrishna7078 4 роки тому +2

    Thanks for good explanation and content .can you make video on javers ?

    • @Javatechie
      @Javatechie  4 роки тому

      Javers is really cool just now I checked it . definitely I will try this

  • @PixelLoafLatte
    @PixelLoafLatte 4 роки тому +1

    what is the different of spring-data-envers and hibernate-envers?

    • @Javatechie
      @Javatechie  4 роки тому +1

      Try to find out difference between hibernate and spring data

    • @PixelLoafLatte
      @PixelLoafLatte 4 роки тому +1

      @@Javatechie got it, spring-data-envers DI of hibernate envers, and have 3 function in it. can u help me create a function to get all history for the revision in the table? i need it for timeline of the data changing

    • @Javatechie
      @Javatechie  4 роки тому +1

      Ok let me check once how can we access revision history data

    • @PixelLoafLatte
      @PixelLoafLatte 4 роки тому

      Have u find out? I tried dig more spring data envers in relation onetomany and struggle to get the history data.. but it successfully saved the log data

  • @bhavanisankar71
    @bhavanisankar71 Рік тому

    Sir atleast can you please print that last method on postman responses body i trying to print but getting 500 error but console like you working

  • @zenhsuld
    @zenhsuld 5 років тому +1

    Great. How to recover previous revision?

    • @Javatechie
      @Javatechie  5 років тому +2

      Your previous revision data you can see in Entity_AUD table , if you want to revert your revision to that then I believe it required manual work

    • @pasza01
      @pasza01 5 років тому

      Java Techie or you can archive the previous record automatically when new records are inserted.. so you can query active records.. minimizing manual work

  • @freetime4896
    @freetime4896 5 років тому +1

    Which tools this one. Its not a eclipse..
    Please tell me that

  • @abhishektrivedi2416
    @abhishektrivedi2416 Рік тому

    Hi sir,
    I implemented the code but if we have 100 fields such as pages.
    then how can we find the list of the fields changed in 1 revision.
    as we are getting all the fields with updated in the revision table.
    but what to do if we just need the field which is changed.
    thanks

    • @hardcorecode
      @hardcorecode 8 місяців тому +1

      compare the fields from from the previous revisions, using revision_types and recision_timestamps

  • @sathishsubramanian2510
    @sathishsubramanian2510 2 роки тому +1

    Can we use this feature for Mongo Repository?🤔🤔

    • @Javatechie
      @Javatechie  2 роки тому

      Not sure at this time will check and update

  • @sowmyarani8833
    @sowmyarani8833 4 роки тому

    Is there a way to have a single Audit table to keep the updated info from all the table rather having 1 -1 table for audit , i have lots of table and all i care is which field updated by whom , i don't want to have 10 audit table for 10 of my table , it will make the system complex

    • @Javatechie
      @Javatechie  4 роки тому

      Audit info should specify to entity so I don't think we can combine them in a single table

    • @vigneshbalachandran9704
      @vigneshbalachandran9704 3 роки тому

      Add entity listener and implement ur own version of audit

  • @girijadevi6090
    @girijadevi6090 3 роки тому

    I'm getting Here an error, that says "unable to read the mapped by attribute". Can please make video on how to solve this issue

  • @BhagyashriBharambe-g9z
    @BhagyashriBharambe-g9z Рік тому

    how i can use auditing for 2 classes use inheritance concept

  • @pasza01
    @pasza01 5 років тому +1

    it looks like this video is not much clear about auditing.. same user can insert and audit?... shouldn't there be a second user who approves the changes and insert into audit tables...

    • @Javatechie
      @Javatechie  5 років тому

      Hi , already I shared one more tutorial regarding auditing , same I mentioned Begin of this video .
      So to mantain changes , as well as user info then we need to combine both the tutorial

  • @luckytheracer4557
    @luckytheracer4557 Рік тому +1

    what about identity of user who edit those entities

    • @Javatechie
      @Javatechie  Рік тому

      If your application implemented security then you can get the user for each change and map

  • @balrajmys
    @balrajmys 4 роки тому +1

    Nice one 👌 does auditing maintains a seperate table for each entity? If so can we combine any entity class auditing to single table?

  • @bhavanisankar71
    @bhavanisankar71 Рік тому

    Sir I followed every step same but getting false for all hibernate mapping please tell me solution 😢

    • @Javatechie
      @Javatechie  Рік тому

      What is the error you are getting

    • @bhavanisankar71
      @bhavanisankar71 Рік тому

      @@Javatechie false for all hibernate mapping in console showing

  • @5minutetuition558
    @5minutetuition558 3 роки тому +1

    How can I find all revisions?

    • @Javatechie
      @Javatechie  3 роки тому

      You can't check in history table

  • @shaiksajid492
    @shaiksajid492 4 роки тому +1

    Bro please explain orm mapping , one to one, one to many , many to many, many to one , and java 9 features

  • @br4676
    @br4676 5 років тому +1

    Thanks sir

  • @azharmobeen
    @azharmobeen 4 роки тому

    Hi Java Techine,
    Nice explanation but one thing is missing updatedBy and creadtedby ( who have created/updated/deleted entity). If you update with these it would be great.
    Thanks,
    Azhar

    • @saqehi
      @saqehi 2 роки тому

      In any case, the createdBy field would not be required because the revision includes the type of operation thus you could deduce the createdBy based on updatedBy

  • @bhavanisankar71
    @bhavanisankar71 Рік тому

    It is working but if I add service layer means it's not working

    • @bhavanisankar71
      @bhavanisankar71 Рік тому +1

      Please give me reply sir

    • @Javatechie
      @Javatechie  Рік тому

      Service layer no way link with migration flow. Can you please share your GitHub link

    • @bhavanisankar71
      @bhavanisankar71 Рік тому +1

      @@Javatechie sorry I am employee recently joined on spring boot designation i can't share my code please do update in your code sir please do it 🙏

    • @Javatechie
      @Javatechie  Рік тому

      No worries I thought it’s your personal code . I am not clear what exactly issue you are having please elaborate it properly so that I can help you out

    • @bhavanisankar71
      @bhavanisankar71 Рік тому

      @@Javatechie sir you directly autowired the repo object in control layer but I need full application like repository layer, service interface, service class and control layer in single application with auditing I need please tell me solution

  • @santhoshkoduri223
    @santhoshkoduri223 5 років тому +1

    Do some microservices vides

  • @kaustubhjirapure1981
    @kaustubhjirapure1981 2 роки тому +1

    source code?

    • @Javatechie
      @Javatechie  2 роки тому

      Please check in video description