Spring项目启动卡死在parsed mapper file: */*.xml 无报错日志

1.报错如图:
在这里插入图片描述
解决办法:
1.检查项目本身是否存在报错提示,比如报错红线。
2.检查是否打了很多断点未取消,可以通过:
黄色框框里的按钮,检查哪里存在断点并且取消;
红色框框里的按钮,临时取消已经存在的断点。
在这里插入图片描述
ps:我还是喜欢那种极为显眼的报错,长长的,什么空指针,下标越界…这种真的好讨厌呜呜呜呜~

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> <!-- 缩小扫描范围到 com.itheima.SpringMVC --> <context:component-scan base-package="com.itheima.SpringMVC"/> <bean id="User" class="com.itheima.SpringMVC.pojo.User"> <property name="username" value="涂大钧"></property> <property name="password" value="123"></property> </bean> <!--数据源--> <context:property-placeholder location="classpath*:jdbc.properties"/> <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"> <property name="driverClassName" value="${jdbc.driver}"/> <property name="url" value="${jdbc.url}"></property> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> </bean> <!--配置sql--> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"></property> <!--别名扫包--> <property name="typeAliasesPackage" value="com.itheima.SpringMVC.pojo"></property> <!--指定XML文件位置--> <!--mybatis-config.xml--> <property name="configLocation" value="classpath:/mybatis-mvc-config.xml" /> </bean> <!--指定Mapper XML文件位置--> <!--扫描Mapper--> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property> <property name="basePackage" value="com.itheima.SpringMVC.Mapper"></property> </bean> <!-- 事务管理器--> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"></property> </bean> <!--开启注解驱动的事务管理--> <tx:annotation-driven transaction-manager="transactionManager"></tx:annotation-driven> </beans><?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <!-- 引入外部配置文件 --> <properties resource="jdbc.properties"> <!-- 可以在这里添加默认属性值 --> </properties> <!-- 设置 MyBatis 核心配置 --> <settings> <!-- 开启驼峰命名自动映射,如将数据库字段 user_name 映射到 Java 属性 userName --> <setting name="mapUnderscoreToCamelCase" value="true"/> <!-- 开启二级缓存 --> <setting name="cacheEnabled" value="true"/> <!-- 开启延迟加载 --> <setting name="lazyLoadingEnabled" value="true"/> <!-- 开启 aggressiveLazyLoading 会导致所有关联对象在被访问时立即加载 --> <setting name="aggressiveLazyLoading" value="true"/> <!-- 配置日志实现 --> <setting name="logImpl" value="STDOUT_LOGGING"/> </settings> <!-- 配置类型别名,简化映射 --> <typeAliases> <package name="com.itheima.SpringMVC.pojo"/> </typeAliases> <!-- 配置插件 --> <plugins> <!-- PageHelper 分页插件 --> <plugin interceptor="com.github.pagehelper.PageInterceptor"> <!-- 可选配置 --> <property name="reasonable" value="true"/> <property name="supportMethodsArguments" value="true"/> <property name="params" value="count=countSql"/> </plugin> </plugins> <!-- 配置数据库环境 --> <environments default="development"> <environment id="development"> <!-- 使用 JDBC 事务管理器 --> <transactionManager type="JDBC"/> <!-- 配置数据源,使用 POOLED 连接池 --> <dataSource type="POOLED"> <property name="driver" value="${jdbc.driver}"/> <property name="url" value="${jdbc.url}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> <!-- 可选配置:连接池参数 --> <property name="poolMaximumActiveConnections" value="10"/> <property name="poolMaximumIdleConnections" value="5"/> </dataSource> </environment> </environments> <!-- 注册映射器 --> <mappers> <package name="com.itheima.SpringMVC.Mapper" /> <!-- <mapper resource="SpringMVC/Mapper/UsersMapper.xml"/>--> <!-- <mapper resource="SpringMVC/Mapper/UserMapper.xml"/>--> <!-- <mapper resource="SpringMVC/Mapper/IdCardMapper.xml"/>--> <!-- <mapper resource="SpringMVC/Mapper/GoodsMapper.xml"/>--> <!-- <mapper resource="SpringMVC/Mapper/GoodsTypeMapper.xml"/>--> <!-- <mapper resource="SpringMVC/Mapper/OrdersMapper.xml"/>--> <!-- <mapper resource="SpringMVC/Mapper/OrderItemsMapper.xml"/>--> </mappers> </configuration>有问题吗
最新发布
05-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值