Skip to content

RESTful API for Blog Web Application using Java Spring Boot, Spring JPA, Spring Security, JWT Authentication, and PostgreSQL database

License

Notifications You must be signed in to change notification settings

bayubagusbagaswara/Blog_App_REST_API

Repository files navigation

Spring Boot Blog Web Application REST API

Instant.now().toEpochMilli()

Test User dulu

  • controller user
  • daftarkan user dulu atau menggunakan endpoint addUser
  • test user harus menyertakan userDetails artinya kita menggunaka Authentication dan Authorization

@Query("SELECT t FROM Transaction t WHERE t.property IN (?1) AND t.createdAt BETWEEN ?2 AND ?3 GROUP BY t.transactionType") List getAllByPropertyAndDatesBetweenGroupedByTransactionType(Set property, Date dateFrom, Date dateTo);

@Query(value = "SELECT u FROM User u WHERE u.name IN :names") List findUserByNameList(@Param("names") Collection names);

Set findByIdIn(Set ids);

CascadeType.PERSIST : cascade type presist means that save() or persist() operations cascade to related entities. CascadeType.MERGE : cascade type merge means that related entities are merged when the owning entity is merged. CascadeType.REFRESH : cascade type refresh does the same thing for the refresh() operation. CascadeType.REMOVE : cascade type remove removes all related entities association with this setting when the owning entity is deleted. CascadeType.DETACH : cascade type detach detaches all related entities if a “manual detach” occurs. CascadeType.ALL : cascade type all is shorthand for all of the above cascade operations.

The orphanRemoval option was introduced in JPA 2.0. This provides a way to delete orphaned entities from the database. While CascadeType.REMOVE is a way to delete a child entity or entities whenever the deletion of its parent happens.

About

RESTful API for Blog Web Application using Java Spring Boot, Spring JPA, Spring Security, JWT Authentication, and PostgreSQL database

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages