This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thu Oct 15 14:08:53 UTC 2020 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SaveItemService | |
{ | |
@PersistenceContext | |
private EntityManager em; | |
@Transactional(propagation = Propagation.REQUIRED) | |
public Item save(Item toSave) | |
{ | |
Item saved = em.merge(toSave); | |
return saved; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="saveItemController" class="com.sample.web.api.SaveItemController"> | |
<property name="saveItemService" ref="saveItemService"/> | |
</bean> |