mac下mysql乱码问题

今天兴致来了,说要在家搞搞平台的东西,nnd,竟然遇到了莫名其妙的mysql乱码问题,其实不是mysql的问题,是jdbc数据源的链接没有指明字符集的问题,记下来备用: < datasource  jta ="false"  jndi-name ="java:jboss/datasources/MySqlDS"  pool-name ="bdp"  enabled ="true"  use-java-context ="true"  use-ccm ="true" >
                     < connection-url >jdbc:mysql://localhost:3306/bdp-dev?useUnicode=true &amp;characterEncoding=utf8 </ connection-url >
                     < driver >com.mysql </ driver >
                     < pool >
                         < min-pool-size >10 </ min-pool-size >
                         < max-pool-size >100 </ max-pool-size >
                         < prefill >true </ prefill >
                         < use-strict-min >false </ use-strict-min >
                         < flush-strategy >FailingConnectionOnly </ flush-strategy >
                     </ pool >
                     < security >
                         < user-name >root </ user-name >
                     </ security >
                     < statement >
                         < prepared-statement-cache-size >32 </ prepared-statement-cache-size >
                         < share-prepared-statements >true </ share-prepared-statements >
                     </ statement >
                 </ datasource >

你可能感兴趣的:(mac下mysql乱码问题)