简单说就是,可以运行的代码,拷贝到新的系统环境中,修改了useSSL之后,dao无法获取了,有没有遇到过类似的问题呢?
具体问题过程是这样的,我用nutz谢了一个简单的demo,dao.js选用的druid+mysql的配置,在代码部署机器上用的很好;
当我把代码拷贝到另外一台计算机时就开始WARRN:
Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+,
5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
于是修改了mysql的配置:增加了useSSL=false,然后新的问题又出现了:
org.nutz.dao.Dao定义下的这段代码:
@Inject
private Dao dao;
中dao获取为null
然后dao.execute(sql)被try{}catch了,空指针异常
简单说就是,可以运行的代码,拷贝到新的系统环境中,修改了useSSL之后,dao无法获取了,有没有遇到过类似的问题呢?