Java 日志实践

每个类一个Logger private static final Logger LOG = LoggerFactory.getLogger(Your.class); 日志级别 trace 最详细的日志级

Spring中的事务回滚

开启声明式事务 spring.xml里配置 <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="${jdbc.driverClassName}" /> <property name="url" value="${jdbc.url}"

我的Emacs

Emacs Prelude Github 配置说明 ~/.emacs.d/personal 目录: 用于存放自己的个性化配置, 最好不要动其

使用Java监控工具出现 Can't attach to the process

问题重现 ➜ jinfo -flags 3032 Attaching to process ID 3032, please wait... Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException: Can't attach to the process sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerException: Can't attach to

MySQL 备份脚本

MySQL 备份 InnoDB 每天备份策略 cd /etc/cron.daily/ touch /etc/cron.daily/dbbackup-daily.sh chmod 755 /etc/cron.daily/dbbackup-daily.sh vi /etc/cron.daily/dbbackup-daily.sh 然后写入以下内容 #!/bin/bash dbs=( "db1"