Mysql5.7遇到运行sql报1055错

[Err] 1055 - nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'swh.attendee.attendee_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

项目中本来使用的是mysql5.6进行开发,切换到5.7之后,突然发现原来的一些sql运行都报错,错误编码1055,错误信息和sql_mode中的“only_full_group_by“有关,到网上看了原因,说是mysql5.7中only_full_group_by这个模式是默认开启的