Using postgres 10-beta3 (hopefully 10.0 this week) on virtual CentOS7 and this JDBC driver postgresql:42.1.4
The postgresql.conf file has
#idle_in_transaction_session_
timeout = 0 # in milliseconds, 0 is disabled
There are numerous places where default settings can be configured.
You should probably login as your application user and do "show idle_in_transaction_session_timeout" to see what a clean session has for a value and then figure out from there where that value is coming from.
David J.