错误: 使用InetAddress.getLocalHost().getHostAddress()提示方法不存在
系统:centos7
环境:docker容器
原因:SElinux处于开启状态
解决办法: setenforce 0 关闭SELinux
注:有时候在centos下提示连接数据库失败,可能是配置文件中数据库地址写成了localhost并且系统没有关闭SELinux
错误: 使用InetAddress.getLocalHost().getHostAddress()提示方法不存在
系统:centos7
环境:docker容器
原因:SElinux处于开启状态
解决办法: setenforce 0 关闭SELinux
注:有时候在centos下提示连接数据库失败,可能是配置文件中数据库地址写成了localhost并且系统没有关闭SELinux
转载于:https://my.oschina.net/u/2937605/blog/901878