Skip to content

Instantly share code, notes, and snippets.

@hpgrahsl
Created July 19, 2019 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hpgrahsl/31d348fddc4dce0cdaff677c78a5250b to your computer and use it in GitHub Desktop.
Save hpgrahsl/31d348fddc4dce0cdaff677c78a5250b to your computer and use it in GitHub Desktop.
OrderService Class
@Service
public class OrderService {
//...
@Transactional
public PurchaseOrder placeOrder(PurchaseOrder order) {
repository.save(order); //NOTE: OrderUpsertedEvent automatically published behind the scenes
return order;
}
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment