2017-01-27 1 views
2

최대 절전 모드에서 ONLY_FULL_GROUP_BY을 (를) 해제해야합니다. 이것은 현재 나의 세션 팩토리입니다. 이 경우 sql_mode = ''를 지정하는 방법을 모르겠습니다.최대 절전 모드에서 ONLY_FULL_GROUP_BY을 (를) 사용하지 않음

<bean id="eAgilitySessionFactory" 
     class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> 
    <property name="dataSource" ref="eAgilitysDataSource"/> 
    <property name="configLocation"> 
     <value>classpath:hibernate.cfg.xml</value> 
    </property> 
    <property name="configurationClass"> 
     <value>org.hibernate.cfg.AnnotationConfiguration</value> 
    </property> 
    <property name="hibernateProperties"> 
     <props> 
      <prop key="hibernate.dialect">${mysql.dialect}</prop> 
      <prop key="hibernate.show_sql">false</prop> 
      <prop key="hibernate.connection.useUnicode">true</prop> 
      <prop key="hibernate.connection.characterEncoding">UTF-8</prop> 
      <prop key="hibernate.connection.charSet">UTF-8</prop> 
      <prop key="hibernate.connection.url">${dwh.db.url}</prop> 
      <prop key="hibernate.connection.driver_class">com.mysql.jdbc.Driver</prop> 
     </props> 
    </property> 
</bean> 

답변

3

여러분의 JDBC 연결 문자열에 sql_mode을 설정할 수 있습니다.

jdbc:mysql://localhost:3306/dbName?sessionVariables=sql_mode='' 
+1

당신은 구세주입니다. 감사합니다. – Napstablook

관련 문제