很久不搭理自己的网站了,几天突然发现启动程序总是被killed, 于是查看了系统日志 vi /var/log/messages 发现出现 kernel: Out of memory: Kill process 这意味着整个系统的内存已经不足,如果不杀死进程的话,就会导致系统的崩溃. Aug 15 13:05:48 izm5earhdmowvut444lz7hz kernel: Out of memory: Kill process 8292 (java) score 150 or sacrifi
1.Creating a Started Service A started service is one that another component starts by calling startService(), resulting in a call to the service's onStartCommand() method. When a service is started, it has a lifecycle that's independent of the compo
最近在搞一个电商系统中由于业务需求,需要在插入一条产品信息后返回产品Id,刚开始遇到一些坑,这里做下笔记,以防今后忘记. 类似下面这段代码一样获取插入后的主键 User user = new User(); user.setUserName("chenzhou"); user.setPassword("xxxx"); user.setComment("测试插入数据返回主键功能"); System.out.println("插入前主键为: