group by查询的时候出现错误:
java.sql.SQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘inms_local.hik_device.device_class’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"

安装mysql没有指定sql_mode
查询当前sql_mode,发现默认是严格的,不允许select的列没有出现在group by中
select version(), @@sql_mode;

修改mysql的配置文件my.conf
在mysqld区域添加 sql_mode=STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION
重启mysql,问题解决