Success with implementation of creating a user with help of Transactional annotation and NamedParameterJdbcTemplate. Now only thing left is show users own history section and not the global mysql table.