我使用实体管理器来持久存入数据库。当我调用这个方法时:createCraResponse调用entitymanager。坚持()。我在日志中看不到“插入Sql语句”。但是在我为select添加一个调用之后,它会插入到Database中但在日志中无异常地停止运行。
protected override void OnWindowCreated(WindowCreatedEventArgs args){
base.OnWindowCreated(args);
var window = args.Window;
window.CoreWindow.CharacterReceived += CoreWindow_CharacterReceived;
}
private void CoreWindow_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
{
System.Diagnostics.Debug.WriteLine("Received Event KeyCode: {0}, KeyStatus: {1}", args.KeyCode, args.KeyStatus.ToString());
}
我扩展了这个类: AbstractBaseDao:
@Repository
@Transactional(propagation=Propagation.REQUIRED)
public class respDaoImp extends AbstractBaseDao implements resDao {
@Override
public void createCraResponse(Response Response) {
entityManager.persist(Response);
}