• SSM整合问题汇总


    问题一:java.sql.SQLException: Access denied for user '121'@'localhost' (using password: YES)

    **解决方法:**
    jdbc.driver=com.mysql.jdbc.Driver
    jdbc.url=jdbc:mysql://localhost:3306/ssmbuild?useSSL=false&useUnicode=true&characterEncoding=utf8
    jdbc.username=root
    jdbc.password=root
    在属性前面加上jdbc前缀,问题解决。
    

    问题二:Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors

    **解决方法:**
    jdbc.url=jdbc:mysql://localhost:3306/ssmbuild?useSSL=true&useUnicode=true&characterEncoding=utf8中的useSSL改为false
    

    问题三:Spring 编程式事务管理xml文件配置问题org.springframework.beans.NotWritablePropertyException: Invalid property
    解决方法:

    <!-- 配置事务管理器 -->
        <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    
            <!--注入数据库连接池-->
            <property name="dataSource " ref="dataSource"/>
    
        </bean>
    中property属性中name的dataSource多了一个空格。
    

    问题四:mybatis报错:A query was run and no Result Maps were found for the Mapped Statement
    解决方法:mybatis中的所有查询,都必须返回resultType或者resultMap的值,否则就会报如上错误的。

    问题五:java.lang.ClassNotFoundException: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException
    解决方法:
    缺少jar包,只要导入一个aspectjweaver.jar就可以了

    <dependency>
    
          <groupId>org.aspectj</groupId>
    
          <artifactId>aspectjweaver</artifactId>
    
          <version>1.9.4<version>
    
        </dependency>
    
    
  • 相关阅读:
    Spark 之 内存模型
    Python 之 windows上安装和pycharm 使用
    Kafka之 kafka消费->SparkStreaming|写入->Kafka|kafka消费->hbase
    SparkStreaming之 任务失败后,自动重启
    微信小程序常用赋值方法小结
    eclipse中xml文件Ctrl+左键不跳转解决办法
    SpringCloud简介以及相关组件
    spring怎么设置定时任务
    Http协议请求的不同类型
    Spring各个jar包作用
  • 原文地址:https://www.cnblogs.com/ITHSZ/p/13916153.html
Copyright © 2020-2023  润新知