如果想执行DDL,则需要使用@Update注解。 例子: @Update("ALTER SYSTEM SWITCH LOGFILE") public void GenerateArchiveLog();