springboot 使用druid往后台传值SQL报错,是在是头疼不知道怎么办了,高C币,解决必采纳

首先说我的场景:我是在前台用layui框架的时间选择器,取到两个时间,开始时间和结束时间,在后台我把取到的两个日期2019-03-29 - 2019-03-31截取了出来,取成了两个字符分别是:2019-03-29,2019-03-31,然后转换成了Date,下面的代码图中能看到我转换之后的值是什么样子!然后报了一个莫名其妙的错误,很难受!是在是不知道哪里错了,求大神指教,看下图;

这是后台接收到值转换并存入数据库的实现

图片说明

下面是mapper.xml中语句

<!-- 模糊查询-->
 <select id="fuzzySelectLogs" resultType="OaLog">
        SELECT * FROM oa_log WHERE
        <if test="name != null">
            name LIKE CONCAT('%',#{name},'%')
        </if>
        <if test="startDate != null and endDate != null">
               AND createdate <![CDATA[>=]]> #{startDate} AND createdate <![CDATA[<]]> #{endDate}
        </if>
        ORDER BY createdate DESC
        <if test="limit!=null and page!=null">
            LIMIT #{limit} OFFSET #{page}
        </if>
    </select>

        <!-- 分页 -->
    <select id="fuzzySelectLogsCount" resultType="int">
        SELECT COUNT(*)FROM oa_log WHERE
        <if test="name != null">
            name LIKE CONCAT('%',#{name},'%')
        </if>
        <if test="startDate != null">
            AND createdate <![CDATA[>=]]> #{startDate} AND createdate <![CDATA[<=]]> #{endDate}
        </if>
    </select>

然后下面是报错!

2019-03-31 05:04:56.652 DEBUG 1675 --- [nio-8081-exec-3] c.h.oasys.dao.IOaLogDao.fuzzySelectLogs  : ==> Parameters: (String), 2019-03-29 00:00:00.0(Timestamp), 2019-03-31 00:00:00.0(Timestamp), 10(Integer), 0(Integer)
2019-03-31 05:04:56,687 ERROR Statement:152 - {conn-10005, pstmt-20013} execute error. SELECT * FROM oa_log WHERE

            name LIKE CONCAT('%',?,'%')


               AND createdate  >=  ? AND createdate  <  ?

        ORDER BY createdate DESC

            LIMIT ? OFFSET ?
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '   AND createdate  >=  '2019-03-29 00:00:00' AND createdate  <  '2019-03-31 00' at line 6
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    at com.mysql.jdbc.Util.getInstance(Util.java:408)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
    at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197)
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409)
    at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)
    at com.alibaba.druid.wall.WallFilter.preparedStatement_execute(WallFilter.java:619)
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)
    at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)
    at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)
    at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
    at com.sun.proxy.$Proxy105.execute(Unknown Source)
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63)
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
    at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
    at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
    at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434)
    at com.sun.proxy.$Proxy70.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:231)
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:128)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:68)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
    at com.sun.proxy.$Proxy77.fuzzySelectLogs(Unknown Source)
    at com.hxxzt.oasys.service.impl.OaLogServiceImpl.fuzzySelectLogs(OaLogServiceImpl.java:43)
    at com.hxxzt.oasys.controller.APIController.fuzzyLogs(APIController.java:303)
    at com.hxxzt.oasys.controller.APIController$$FastClassBySpringCGLIB$$2f9e5a50.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
    at com.hxxzt.oasys.controller.APIController$$EnhancerBySpringCGLIB$$ebb404c6.fuzzyLogs(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
2019-03-31 05:04:56.697  INFO 1675 --- [nio-8081-exec-3] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
2019-03-31 05:04:56.725  INFO 1675 --- [nio-8081-exec-3] o.s.jdbc.support.SQLErrorCodesFactory    : SQLErrorCodes loaded: [DB2, Derby, H2, HDB, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
2019-03-31 05:04:56.740 ERROR 1675 --- [nio-8081-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: 
### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '   AND createdate  >=  '2019-03-29 00:00:00' AND createdate  <  '2019-03-31 00' at line 6
### The error may exist in file [/Users/planet/IdeaProjects/oa_system/target/classes/mapper/OaLogMapper.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT * FROM oa_log WHERE                       name LIKE CONCAT('%',?,'%')                                    AND createdate  >=  ? AND createdate  <  ?                   ORDER BY createdate DESC                       LIMIT ? OFFSET ?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '   AND createdate  >=  '2019-03-29 00:00:00' AND createdate  <  '2019-03-31 00' at line 6
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '   AND createdate  >=  '2019-03-29 00:00:00' AND createdate  <  '2019-03-31 00' at line 6] with root cause

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '   AND createdate  >=  '2019-03-29 00:00:00' AND createdate  <  '2019-03-31 00' at line 6
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_172]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_172]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_172]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_172]
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[mysql-connector-java-5.1.46.jar:5.1.46]
    at com.mysql.jdbc.Util.getInstance(Util.java:408) ~[mysql-connector-java-5.1.46.jar:5.1.46]
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944) ~[mysql-connector-java-5.1.46.jar:5.1.46]
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976) ~[mysql-connector-java-5.1.46.jar:5.1.46]
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912) ~[mysql-connector-java-5.1.46.jar:5.1.46]
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) ~[mysql-connector-java-5.1.46.jar:5.1.46]
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683) ~[mysql-connector-java-5.1.46.jar:5.1.46]
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486) ~[mysql-connector-java-5.1.46.jar:5.1.46]
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858) ~[mysql-connector-java-5.1.46.jar:5.1.46]
    at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197) ~[mysql-connector-java-5.1.46.jar:5.1.46]
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409) ~[druid-1.1.10.jar:1.1.10]
    at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440) ~[druid-1.1.10.jar:1.1.10]
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407) ~[druid-1.1.10.jar:1.1.10]
    at com.alibaba.druid.wall.WallFilter.preparedStatement_execute(WallFilter.java:619) ~[druid-1.1.10.jar:1.1.10]
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407) ~[druid-1.1.10.jar:1.1.10]
    at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440) ~[druid-1.1.10.jar:1.1.10]
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407) ~[druid-1.1.10.jar:1.1.10]
    at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167) ~[druid-1.1.10.jar:1.1.10]
    at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498) ~[druid-1.1.10.jar:1.1.10]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_172]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_172]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_172]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_172]
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.4.0.jar:3.4.0]
    at com.sun.proxy.$Proxy105.execute(Unknown Source) ~[na:na]
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63) ~[mybatis-3.4.0.jar:3.4.0]
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) ~[mybatis-3.4.0.jar:3.4.0]
    at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63) ~[mybatis-3.4.0.jar:3.4.0]
    at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[mybatis-3.4.0.jar:3.4.0]
    at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.4.0.jar:3.4.0]
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[mybatis-3.4.0.jar:3.4.0]
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83) ~[mybatis-3.4.0.jar:3.4.0]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148) ~[mybatis-3.4.0.jar:3.4.0]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) ~[mybatis-3.4.0.jar:3.4.0]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_172]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_172]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_172]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_172]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434) ~[mybatis-spring-1.3.0.jar:1.3.0]
    at com.sun.proxy.$Proxy70.selectList(Unknown Source) ~[na:na]
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:231) ~[mybatis-spring-1.3.0.jar:1.3.0]
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:128) ~[mybatis-3.4.0.jar:3.4.0]
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:68) ~[mybatis-3.4.0.jar:3.4.0]
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53) ~[mybatis-3.4.0.jar:3.4.0]
    at com.sun.proxy.$Proxy77.fuzzySelectLogs(Unknown Source) ~[na:na]
    at com.hxxzt.oasys.service.impl.OaLogServiceImpl.fuzzySelectLogs(OaLogServiceImpl.java:43) ~[classes/:na]
    at com.hxxzt.oasys.controller.APIController.fuzzyLogs(APIController.java:303) ~[classes/:na]
    at com.hxxzt.oasys.controller.APIController$$FastClassBySpringCGLIB$$2f9e5a50.invoke(<generated>) ~[classes/:na]
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at com.hxxzt.oasys.controller.APIController$$EnhancerBySpringCGLIB$$ebb404c6.fuzzyLogs(<generated>) ~[classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_172]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_172]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_172]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_172]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) ~[shiro-web-1.4.0.jar:1.4.0]
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) ~[shiro-web-1.4.0.jar:1.4.0]
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) ~[shiro-core-1.4.0.jar:1.4.0]
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) ~[shiro-core-1.4.0.jar:1.4.0]
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387) ~[shiro-core-1.4.0.jar:1.4.0]
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) ~[shiro-web-1.4.0.jar:1.4.0]
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) ~[shiro-web-1.4.0.jar:1.4.0]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123) ~[druid-1.1.10.jar:1.1.10]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_172]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_172]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.31.jar:8.5.31]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_172]


这种报错实在是太诡异了!完全不知其所以然!求大神告知,重谢!!!!!!!!!!!!

3个回答

已解决,where标签没加的问题

<select id="fuzzySelectLogs" resultType="OaLog">
        SELECT * FROM oa_log
        <where>
            <if test="startDate != null and endDate != null">
                AND createdate <![CDATA[>=]]> #{startDate} ND createdate <![CDATA[<]]>
                #{endDate}
            </if>
            <if test="name != null">
                AND name LIKE CONCAT('%',#{name},'%')
            </if>
        </where>
        ORDER BY createdate DESC
        <if test="limit!=null and page!=null">
            LIMIT #{limit} OFFSET #{page}
        </if>
    </select>

    <select id="fuzzySelectLogsCount" resultType="int">
        SELECT COUNT(*)FROM oa_log
        <where>
            <if test="startDate != null and endDate != null">
                AND createdate <![CDATA[>=]]> #{startDate} AND createdate <![CDATA[<=]]>
                #{endDate}
            </if>
            <if test="name != null">
                AND name LIKE CONCAT('%',#{name},'%')
            </if>
        </where>
    </select>

PLANET_08
PLANET_08 ???
6 个月之前 回复
<if test="startDate != null ">
        AND createdate  &gt;= #{startDate,jdbcType=DATE} 
    </if>
    <if test="endDate != null ">
        AND createdate  &lt;= #{endDate,jdbcType=DATE} 
    </if>

或者

<if test="startDate != null ">
    AND <![CDATA[ createdate >= #{startDate,jdbcType=DATE}  ]]>
</if>
<if test="endDate != null ">
    AND <![CDATA[ createdate <= #{endDate,jdbcType=DATE}  ]]>
</if>
PLANET_08
PLANET_08 这个我试过了还是不行
6 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Druid是什么?jfinal是怎么使用Druid的?
Druid是什么?jfinal是怎么使用Druid的?如下途中配置插件部分:其中jdbcurl,user,password,在project.txt中配置。
ajax怎么往后台传值
asp.net 用纯ajax,不用其他框架rn怎么把表单中的内容,传到后台进行处理,后台又怎么接收rn例如一个注册表单,用户填写完后,怎么用ajax把注册的内容都传到后台,后台怎么进行接收。rn谢谢
什么是c币
么是C币 C币是CSDN推出的虚拟货币。 C币有什么用 使用C币购买C币商城内的商品,在活动期内享受免邮优惠。当您兑换实物礼品成功后,我们会在15个工作日内送达。节假日及偏远地区略有延迟,您在礼品签收时不用支付任何费用; 官方赠送的C币有效期为一年(到账后一年内)。购买的C币不过期; 使用C币购买下载频道内资源,需要扣除相应的C币数量。自下载之日起30日内重复下载同一资源免费,30日后再次下载需...
头疼的问题,不知道怎么解决
我用C#写了个程序,可是我拿到别人的机子上没办法运行,即使装了.Net FrameWork 2.0 也不行,但是,装上Visual Studio 2005 就可以了,不是说装上.Net Framework20就可以了吗?真是搞不懂!rn请大家帮帮我!rn小弟在此谢谢了!
掉电了!!不知道怎么办了!!
各位大哥大姐::帮帮我呀!!rn我的机子动不动就掉电了,有时候掉电了,就不能启动了!!rn只好拔了电源在来!!rn我的机子是一个月前配的!rn但是我去配电脑的地方!他又不掉电,我都郁闷死了,它要是坏了!!rn我就可以去换,可是它就是不坏!!rn还有他说是我们这里的电压不稳,可是我们这里是寝室所有的电脑都很好呀!!!rn谁能帮我呀!!
后台往前台传值
$(document).ready(function(){         var flag=${flag};//从后台传过来的直接用$引用即可。         if(flag==1){             alert("主题和内容均不能为空");         }                });
后台是怎么向html传值的
html里的这段代码中xmdwdm等参数值是通过什么方式从后台得到的啊rn rn上面的那几个参数都是这个list里对象的属性,但是怎么从后台传到页面来的呀?rnvar reportListAction = top.path+'/api/0/ptcg/statement/list',//获得统计报表列表rn function loadReportList(currentPage) rn $('#query-result').pagingList(rn action:reportListAction,rn currentPage:currentPage,rn jsonObj:$('#query-report-form').serializeObject(),rn callback:pageBackrn );rn rnfunction pageBack(data) rn alert(4);rn pageData = data;rn $('#statistical-reports-table').find('tbody').fixData(editLimit:editLimit,commentLimit:commentLimit).template(data,function(item)rn item.deleteLimit = deleteLimit;rn alert(deleteLimit);rn if(item.zdzxm === top.trueName)rn item.deleteLimit = '1';rn rn item.bbjj = item.bbjj ? item.bbjj.replace(/\r\n|\n\r|\n/gm,' ') : '';rn ,true);rn isShowMore();//报表简介更多显示rn
上传文件是遇到了麻烦,不知道怎么办了
代码:rnRequest.File[0].SaveAs(Request["dir"]+"\\"+file_name.text);rn出现错误的提示是:rn索引超出范围。必须为非负值并小于集合大小。参数名: index
觉得是个超简单的问题,就是不知道怎么办了?????
using System; rnusing System.IO; rnnamespace c1 rn rn /// rn /// Class1 的摘要说明。 rn /// rn class myproduct rn rn static int dirCounter=1; rn static int indentLevel=-1; rn /// rn /// 应用程序的主入口点。 rn /// rn [STAThread] rn public static void Main() rn rn myproduct md=new myproduct(); rn string the=@"E:\ge"; rn DirectoryInfo dir=new DirectoryInfo(the); rn md.ExploreDirectory(dir); rn Console.WriteLine("\n找到0个目录\n",dirCounter); rn rn public void ExploreDirectory(DirectoryInfo dir) rn rn indentLevel++; rn indentLevel=dir????????? rn rn for (int i=0;i
java前台往后台传值乱码一般都怎么解决
java前台往后台传值乱码一般都怎么解决? java前台往后台传值乱码一般都怎么解决?
我真的不知道怎么办了?
我将<%@ Webservice Language="C#" class="DailyHoro" %> 加到.asmx文件的顶部但编译器老报在"<" (命名区域不能有属性字段.....定义)错我真的不知道怎么办了.rn
做一个管理系统,不知道怎么办了!
我在为公司做一个管理系统,现在数据库用MS SQL,前台想用DELPHI来做,可是发现在是多用户操作的情况下,可以数据做出错,如果一个用户在对一条数据进行修改,而另外一个用户把这条记录给删除了,这种情况应该会比较多!rn请大家给点意见,我应该怎么用什么技术来做这个程序!
我真的不知道怎么办了
Public Class formdenglurn Inherits System.Windows.Forms.Formrn Private Function ExecuteSQL(ByVal SQL As String) As Stringrn Dim con As New SqlConnection("Server=.;Integrated Security=SSPI;Database=Marcket")rn Dim command As New SqlCommandrn command.Connection = conrn command.CommandText = SQLrn Tryrn con.Open()rn Dim str As String = command.ExecuteScalar()rn Return strrn Catch ex As Exceptionrn MsgBox(ex.ToString)rn Finallyrn con.Close()rn End Tryrn Return Nothingrn End Functionrnrn出现错误:rnrn未处理的“System.NullReferenceException”类型的异常出现在 登陆界面.exe 中。rnrn其他信息: 未将对象引用设置到对象的实例。
jdk bug 不知道怎么办了。
import java.awt.BorderLayout;rnimport java.awt.event.ActionEvent;rnimport java.awt.event.ActionListener;rnimport java.io.File;rnrnimport javax.swing.*;rnimport javax.swing.filechooser.FileSystemView;rnrnpublic class han46 extends JFrame implements ActionListenerrnrn /**rn * @param argsrn */rn JPanel jp=null;rn rn JMenuBar jmb=null;rn JMenu jm=null;rn JMenuItem jmi1=null;rn JMenuItem jmi2=null;rn JTextField jtf=null;rn rn public static void main(String[] args) rn // TODO Auto-generated method stubrn han46 h=new han46();rn rn rn public han46()rn jmb=new JMenuBar();rn jm=new JMenu("菜单");rn jmi1=new JMenuItem("打开");rn jmi2=new JMenuItem("保存");rn jmb.add(jm);rn jm.add(jmi1);rn jm.add(jmi2);rn jmi1.addActionListener(this);rn jmi2.addActionListener(this);rn jmi1.setActionCommand("打开");rn jmi2.setActionCommand("保存");rn jtf=new JTextField();rn rn this.add(jmb,BorderLayout.NORTH);rn this.add(jtf);rn rn this.setSize(300,150);rn this.setLocation(500, 200);rn this.setTitle("记事本");rn this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);rn this.setVisible(true);rn rn rn rn rn rnrn public void actionPerformed(ActionEvent arg0) rn // TODO Auto-generated method stubrn if(arg0.getActionCommand().equals("打开"))rn System.out.println(arg0.getActionCommand());rn final JFileChooser jfc1=new JFileChooser();rn jfc1.setDialogTitle("请选择文件");rn jfc1.showOpenDialog(null);rn jfc1.setVisible(true);rn else if(arg0.getActionCommand().equals("保存"))rn System.out.println(arg0.getActionCommand());rn rn rnrnrnrn这段代码,本来是想新建一个JFileChooser(),可是一直提示这个有错,在别人的计算机上这段代码是没有错的。经过查询得知这是个bugrn网址说明如下:rnhttps://netbeans.org/bugzilla/show_bug.cgi?id=188522rn于是我就在重新下载了jdk1.7.0装在myeclipse上,可是还是不行。rn我的win7版本号,和上面网址的说明的一样。难道非要我重装系统吗?rn我现在正准备装myeclipse10.0,不知道能不能解决这个问题。rn请问这个问题通过安装高版本的jdk能不能解决?rn
Druid在SpringBoot下的使用
说明 Druid是Java语言中最好的数据库连接池。Druid能够提供强大的监控和扩展功能。DruidDataSource支持的数据库: 理论上说,支持所有有jdbc驱动的数据库。实际测试过的有 数据库 支持状态 mysql 支持,大规模使用 oracle 支持,大规模使用 sqlserver 支持 postgres 支持 db2 支持 ...
Druid在springboot中的使用
1.引入包(任选其一) &amp;lt;!-- druid数据库连接池 --&amp;gt; &amp;lt;!-- &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;com.alibaba&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;druid&amp;lt;/artifactId&amp;gt; &amp;lt;version&amp;gt;1.1.9&amp;l
springboot使用druid连接池
1 pom加依赖, 我的版本 &amp;lt;druid.version&amp;gt;1.1.6&amp;lt;/druid.version&amp;gt; &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;com.alibaba&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;druid&amp;lt;/artifactId&amp;gt; &amp;lt;version&a
springboot 使用Druid数据库连接池
Druid 阿里开源的数据库连接池 选择的理由: Druid 经历了阿里双十一的场景,足以可见其性能。 Druid 有完整的监控,可以实时监控数据库状态及sql的执行时间。 提供有丰富的监控器,自定义监控器也很方便。 springboot 默认的连接池是HikariCP,使用Druid : 引入jar 包。 &amp;lt;!--数据库连接池--&amp;gt; &amp;lt...
springboot 使用Druid数据库连接池
一、Druid是什么? Druid是阿里巴巴发的号称为监控而生的数据库连接池。 Druid是一个数据库连接池。在功能、性能、扩展性上都超过了其他数据库连接池,包括DBCP等。 同时,Druid是一个jdbc组件,包括三部分:     基于Filter-Chain模式的插件体系。     DruidDataSource 高效可管理的数据库连接池。     SQLParser 二、Dru...
MSComm出错,不知道怎么办了!
今天编了一个MSComm程序,编译也通过,但是运行就出错。rn提示occsite.cpp 这行rnASSERT(pWndCtrl->m_pCtrlSite == NULL rnassertion failure rnrn我把MFC对话框下的MSComm控件删除就不报错了,请教各位大侠,怎么解决啊?!rn
不知道自己该怎么办了!!
我中了icebat的这种病毒,这种病毒针对于我机器的exe文件,现在我机器的exe文件都已经丢失,我在DOS系统下杀这种病毒但是没有作用,我把机器重新做了一遍系统但是这种病毒还在我的机器里,继续删除我机器里的大量exe文件,请大家帮帮我吧,怎么样才能把这种病毒杀干净呢,我用的杀毒软件是pc_cillin(最新版本的),请大家援助,谢谢!!!
实在不知道怎么办了...求助
[code=HTML]rn rnrn rnrn rn rn rnrn[/code]rnrnrn今天发现了一个奇怪的现象...蛋疼啊rn我在一个html文件中,写了上述的代码,当浏览器第一次载入的时候,会在浏览器(公司电脑中装的是IE6)底部状态栏中弹出一个脚本错误提示,原因是双引号不匹配([color=#FF0000]图1[/color]),但是当我在页面上右键刷新页面之后,这个脚本错误提示却消失了([color=#FF0000]图2[/color]),我关掉浏览器再次载入这个html页面的时候,又会弹出脚本错误提示,我rn刷新页面后脚本错误提示又消失了,也就是说,只有关掉浏览器重新打开页面的时候才会有脚本错误提示,这个是什么情况啊?需要在浏览器中设置什么?还是浏览器的bug?又或是其他的什么原因?rnrn谁能帮我一下,谢谢了rnrn[color=#FF0000]图1[/color]rn[img=http://img.my.csdn.net/uploads/201204/10/1333987901_8612.jpg][/img]rnrnrn[color=#FF0000]图2[/color]rn[img=http://img.my.csdn.net/uploads/201204/10/1333987940_2552.jpg][/img]
jsp 往后台传值乱码问题
一般在项目中web.xml配置编码过滤器 后就很少会出现乱码情况,但是我在项目开发中,遇到get请求就会出现乱码,所以会用以下方法解决 String name=new String(name.getBytes(“ISO-8859-1”), “UTF-8”); 在这里浏览器的编码为ISO-8859-1,将它转为UTF-8即可。 在前段时间的项目开发中,由于公司一个新来的同事没有设置tomcat和
【ajax】-前台往后台传值
post方法: $.post('/CalculateScoreFrame/CalculateDevelopmentQuantityResult', { "checkyear": CheckYear, "targetID": targetID }, function () {
循环往后台传值问题
[img=https://img-bbs.csdn.net/upload/201704/10/1491825971_269881.jpg][/img]rn我怎么把bookid这个值一块传到Action中,在action中怎么接受?本人刚入行,望大神指教
springboot使用druid完成sql监控
    springboot作为现在十分流行的框架,简化Spring应用的初始搭建以及开发过程,现在我们就使用springboot来进行简单的web项目搭建并对项目sql进行监控。    1、本文基于IDE为idea如果使用eclipse可以下载STS插件创建项目,更加快捷方便。    由于有些jar在idea中无法这样选择配置,可以再生成项目有手动加上maven 依赖。&amp;lt;dependenc...
不知道这个问题大家是怎么解决的?
我在做页面的时候,常常要用到<% for(int i=0;i的循环,将它放在页面上之后,页面就没法可视化的编辑调整了,在C#的代码里写有时候又不可能,用DATAGRID,有些特别的功能样式又没办法解决,不知道各位大虾怎么解决的饿?
使用druid连接数据库报错
使用druid时一直报错,如图[img=https://img-bbs.csdn.net/upload/201711/02/1509607148_788844.png][/img]rn但是使用c3p0就没有错误啊
难办的问题,不知道大家是怎么解决的?
不同型号的手机支持的wml版本不一样,有的甚至不支持wmlscript。这该怎么办啊?总不至于叫客户买个可以支持的手机吧?
也不知道怎么获取c币
难道只能买吗?看上一个包含九段线的shp文件,都不知道能不能用就得先买C币吗。。。。。。。搞不懂啊
大家是怎么解决后台系统的安全问题的?
我用ASP做的网站后台被人破解了,我用的是ACCESS数据库,设了密码。可是他可以看到所有注册用户以及站内信息!大家帮帮我吧,谢谢了!
c/s模式,后台是sql server
c/s模式的应用程序在2000 server/98下正常,而在2000 professional下就速度奇慢,好几次都要刷屏后才行。该应用程序还创建了一个线程。rn为何在2000 professional就不行了呢?rn
使用ajaxpro 后台传值给前台页面报错!
使用ajaxpro 后台传值给前台页面报 "XXX 未定义" 为什么会这样!rn rn 页面代码:rn [code=HTML]rn rn rn rnrnrn rn rn rn rn rn rn rnrn [/code]rn rn 后台代码:rn [code=C#]rn protected void Page_Load(object sender, EventArgs e)rn rn AjaxPro.Utility.RegisterTypeForAjax(typeof(ajaxprotest)); rn rnrn [AjaxPro.AjaxMethod]rn public int addum(int num)rn rn ++num;rn return num;rn rn rn[/code]
springboot + druid
最近项目中用到微服务提供ElasticSearch数据源,由于列可配置,采用JDBC的方式,查询很多资源,没有想要的,在别人的基础上自己调试成功了一套代码,采用最新的SpringBoot,并且用Junit可以调试。希望能够给新入门的人提供一下方便。 包含数据库及源码,绝对导入可用
SpringBoot Druid整合,SpringBoot 集成Druid
NULL 博文链接:https://fanshuyao.iteye.com/blog/2415353
后台sql是拼接成的,怎么处理?
把sql脚本指定给数据窗口
SpringBoot 使用druid监控数据库
1、添加maven依赖注解<!-- https://mvnrepository.com/artifact/com.alibaba/druid --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <versio
Springboot 使用数据库连接池 Druid【详】
本人也是刚开始使用Druid 现在java比较火的数据库连接池有 Hikaricp 和 Druid 我看了一些教程 Hikaricp是一个很好的数据库连接池,速度非常快,而且评价特别高。对于自己的话,自己选择的是Druid,因为Druid是阿里的产品,有很多官方文档是中文,简单易读,而且自己只是学习来用,Druid足够了。 自己查了一些资料,因为自己使用springboot比较多,所以选择的spr...
SpringBoot下的Druid连接池的配置和使用
Druid是一个JDBC组件,druid 是阿里开源在 github 上面的数据库连接池,它包括三部分: * DruidDriver 代理Driver,能够提供基于Filter-Chain模式的插件体系。 * DruidDataSource 高效可管理的数据库连接池。 * SQLParser 专门解析 sql 语句 Druid 有什么优点?(来源网络) 1. 可以监控数据库访问性能,Dr...
springboot后台服务搭建(四 整合druid)
总览:https://blog.csdn.net/qq_22037575/article/details/86687765 本文概要:springboot2.x 整合 druid 码云:https://gitee.com/RichterGit/csdn/tree/master/springboot-radmin/004/ 目录 1.pom导入依赖 2.全局配置 3.访问 1.pom导...
相关热词 c# 线程结束时执行 c# kb mb 图片 c# 替换第几位字符 c#项目决定成败 c# 与matlab c# xml缩进 c#传感器基础 c#操作wps c# md5使用方法 c# 引用父窗口的组件