Create a dedicated package for all customer management related functionality
Extract logic of UserAccount creation and customer creation into a transactional service (currently the logic in ShopController.registerNew(…) consists of two steps and is not transactional).
Turn RegistrationForm into a domain type.
Extract dedicated controller and expose functionality in a more idiomatic way.
The customer management should be improved:
UserAccount
creation and customer creation into a transactional service (currently the logic inShopController.registerNew(…)
consists of two steps and is not transactional).RegistrationForm
into a domain type.