utf8mb4和utf8的不同、若依框架,代码生成器,gitee,前端vue的下载、修复和启动(寻求大佬帮助若依框架三、2.3)

2024.7.9

  • 一、数据库的排序和统一问题。utf8mb4和utf8的不同
  • 1.1 发现问题
    • 1.2 解决问题-在idea中用sql生成器,生成sql语句,然后在里面修改
    • 1.3 utf8和utf8mb4的区别
  • 二、若依前后端框架。代码生成器(还没研究懂,但有三个方案)
    • 2.1 若依框架的优缺点(十分片面)
    • 2.2 若依框架的下载,安装和运行:
    • 2.3 遇到的问题(希望有人能帮到我)
      • 2.3.1 pom
      • 2.3.2 mapper.xml能和mapper用mybatis连接上跳转。
      • 2.3.3 报的错误
    • 2.4 解决了的问题
      • 2.4.1 xml中 type=、parameterType=报错,见图(这是修改过的了)
      • 2.4.2 在我们的实体类上面增加一个注解@Alias("TmsTb01"):
      • 2.4.3 @Alias(我的理解是别名)
    • 2.5 使用mybatis-generator (没咋看懂,还有git上的代码生成器,和若依差不多。)
  • 三、gitee
    • 1 为什么使用到gitee了
    • 2 gitee的登录和创建仓库以及邀请组员
      • 2.1 gitee官网:[https://gitee.com/](https://gitee.com/)
      • 2.2 然后创建仓库:
      • 2.3 邀请组员
      • 2.4 推拉数据
  • 四、前端vue的下载修复和启动
    • 1 运行和下载npm run dev、npm install
    • 2 下载完进行修复npm audit fix(好习惯!)
    • 3 npm audit和npm audit fix的不同:

一、数据库的排序和统一问题。utf8mb4和utf8的不同

1.1 发现问题

在我们小组的分工合作完,建好数据库表之后,合并的时候,发现有冲突。因为三个组员使用的Navicat,没有utf8,用的是默认的utf8mb4和utf8mb4_general_ci这两个字符集和排序规则。导致我们总和数据库的时候,发现问题。
在这里插入图片描述
在这里插入图片描述

1.2 解决问题-在idea中用sql生成器,生成sql语句,然后在里面修改

在这里插入图片描述
把每个表最后的utf8mb4修改为utf8后,保存,重新执行。

1.3 utf8和utf8mb4的区别

utf8 是 Mysql 中的一种字符集,只支持最长三个字节的 UTF-8字符,也就是 Unicode 中的基本多文本平面。要在 Mysql 中保存 4 字节长度的 UTF-8 字符,需要使用 utf8mb4 字符集,但只有 5.5.3 版本以后的才支持。
如果遇到 4 字节的字符就会出现错误了。三个字节的 UTF-8 最大能编码的 Unicode 字符是 0xFFFF,也就是 Unicode 中的基本多文平面(BMP)。也就是说,任何不在基本多文平面的 Unicode字符,都无法使用MySQL原有的 utf8 字符集存储。这些不在BMP中的字符包括哪些呢?最常见的就是Emoji 表情(Emoji 是一种特殊的 Unicode 编码,常见于 ios 和 android 手机上),和一些不常用的汉字,以及任何新增的 Unicode 字符等等。

二、若依前后端框架。代码生成器(还没研究懂,但有三个方案)

2.1 若依框架的优缺点(十分片面)

对于我来说,这是一个没有深入研究过的东西,是小组成员商讨然后使用。对于若依的前后端分离框架:
优点是:数据库的字段超级多,我们也需要相应的元素,和一些重复的代码开发,使用若依可以直接专注于代码的开发,前后端都已经是较为完善的了。
缺点是:对于刚接触若依框架的我们来说,很多模块,功能有点找不清,而且我们需要开发的话,固定在rouyi-system里面来写,需要花大量时间去继续研究代码的含义,以及如何去重新开一个模块,写自己的代码。(我知道,还是我业务能力低,大佬早就解决了,接触时间太少了,后续多接触,再回来改)。

2.2 若依框架的下载,安装和运行:

直接看大佬的吧:https://blog.csdn.net/moran_3346/article/details/131803190

2.3 遇到的问题(希望有人能帮到我)

我想独立出一个模块来写自己的代码,所以我创建了一个空模块,然后去重新写所有的配置
代码太多了,我只粘出部分重要的代码:

2.3.1 pom

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>com.ruoyi</groupId><artifactId>ruoyi</artifactId><version>3.8.8</version></parent><groupId>com.fst</groupId><version>3.8.8</version><artifactId>Shipping_lists</artifactId><properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties><dependencies><!-- 通用工具--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common</artifactId></dependency></dependencies></project>

2.3.2 mapper.xml能和mapper用mybatis连接上跳转。

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fst.mapper.ShipInfoChangeMapper"><resultMap type="TmsTb01" id="ShipInfoChangeResult"><result property="omTermInfoId"    column="om_term_info_id"    /><result property="newOutRegionId"    column="new_out_region_id"    /><result property="oldOutRegionId"    column="old_out_region_id"    /><result property="newTakeAddress"    column="new_take_address"    /><result property="oldTakeAddress"    column="old_take_address"    /><result property="newBranchName"    column="new_branch_name"    /><result property="oldBranchName"    column="old_branch_name"    /><result property="newBankContacts"    column="new_bank_contacts"    /><result property="oldBankContacts"    column="old_bank_contacts"    /><result property="newBankTel"    column="new_bank_tel"    /><result property="oldBankTel"    column="old_bank_tel"    /><result property="newOutLogisticsProviderInfoId"    column="new_out_logistics_provider_info_id"    /><result property="oldOutLogisticsProviderInfoId"    column="old_out_logistics_provider_info_id"    /></resultMap><sql id="selectShipInfoChangeVo">select om_term_info_id, new_out_region_id, old_out_region_id, new_take_address, old_take_address, new_branch_name, old_branch_name, new_bank_contacts, old_bank_contacts, new_bank_tel, old_bank_tel, new_out_logistics_provider_info_id, old_out_logistics_provider_info_id from ship_info_change</sql><select id="selectShipInfoChangeList" parameterType="TmsTb01" resultMap="ShipInfoChangeResult"><include refid="selectShipInfoChangeVo"/><where><if test="newOutRegionId != null "> and new_out_region_id = #{newOutRegionId}</if><if test="oldOutRegionId != null "> and old_out_region_id = #{oldOutRegionId}</if><if test="newTakeAddress != null  and newTakeAddress != ''"> and new_take_address = #{newTakeAddress}</if><if test="oldTakeAddress != null  and oldTakeAddress != ''"> and old_take_address = #{oldTakeAddress}</if><if test="newBranchName != null  and newBranchName != ''"> and new_branch_name like concat('%', #{newBranchName}, '%')</if><if test="oldBranchName != null  and oldBranchName != ''"> and old_branch_name like concat('%', #{oldBranchName}, '%')</if><if test="newBankContacts != null  and newBankContacts != ''"> and new_bank_contacts = #{newBankContacts}</if><if test="oldBankContacts != null  and oldBankContacts != ''"> and old_bank_contacts = #{oldBankContacts}</if><if test="newBankTel != null  and newBankTel != ''"> and new_bank_tel = #{newBankTel}</if><if test="oldBankTel != null  and oldBankTel != ''"> and old_bank_tel = #{oldBankTel}</if><if test="newOutLogisticsProviderInfoId != null "> and new_out_logistics_provider_info_id = #{newOutLogisticsProviderInfoId}</if><if test="oldOutLogisticsProviderInfoId != null "> and old_out_logistics_provider_info_id = #{oldOutLogisticsProviderInfoId}</if></where></select><select id="selectShipInfoChangeByOmTermInfoId" parameterType="Long" resultMap="ShipInfoChangeResult"><include refid="selectShipInfoChangeVo"/>where om_term_info_id = #{omTermInfoId}</select><insert id="insertShipInfoChange" parameterType="TmsTb01">insert into ship_info_change<trim prefix="(" suffix=")" suffixOverrides=","><if test="omTermInfoId != null">om_term_info_id,</if><if test="newOutRegionId != null">new_out_region_id,</if><if test="oldOutRegionId != null">old_out_region_id,</if><if test="newTakeAddress != null">new_take_address,</if><if test="oldTakeAddress != null">old_take_address,</if><if test="newBranchName != null">new_branch_name,</if><if test="oldBranchName != null">old_branch_name,</if><if test="newBankContacts != null">new_bank_contacts,</if><if test="oldBankContacts != null">old_bank_contacts,</if><if test="newBankTel != null">new_bank_tel,</if><if test="oldBankTel != null">old_bank_tel,</if><if test="newOutLogisticsProviderInfoId != null">new_out_logistics_provider_info_id,</if><if test="oldOutLogisticsProviderInfoId != null">old_out_logistics_provider_info_id,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="omTermInfoId != null">#{omTermInfoId},</if><if test="newOutRegionId != null">#{newOutRegionId},</if><if test="oldOutRegionId != null">#{oldOutRegionId},</if><if test="newTakeAddress != null">#{newTakeAddress},</if><if test="oldTakeAddress != null">#{oldTakeAddress},</if><if test="newBranchName != null">#{newBranchName},</if><if test="oldBranchName != null">#{oldBranchName},</if><if test="newBankContacts != null">#{newBankContacts},</if><if test="oldBankContacts != null">#{oldBankContacts},</if><if test="newBankTel != null">#{newBankTel},</if><if test="oldBankTel != null">#{oldBankTel},</if><if test="newOutLogisticsProviderInfoId != null">#{newOutLogisticsProviderInfoId},</if><if test="oldOutLogisticsProviderInfoId != null">#{oldOutLogisticsProviderInfoId},</if></trim></insert><update id="updateShipInfoChange" parameterType="TmsTb01">update ship_info_change<trim prefix="SET" suffixOverrides=","><if test="newOutRegionId != null">new_out_region_id = #{newOutRegionId},</if><if test="oldOutRegionId != null">old_out_region_id = #{oldOutRegionId},</if><if test="newTakeAddress != null">new_take_address = #{newTakeAddress},</if><if test="oldTakeAddress != null">old_take_address = #{oldTakeAddress},</if><if test="newBranchName != null">new_branch_name = #{newBranchName},</if><if test="oldBranchName != null">old_branch_name = #{oldBranchName},</if><if test="newBankContacts != null">new_bank_contacts = #{newBankContacts},</if><if test="oldBankContacts != null">old_bank_contacts = #{oldBankContacts},</if><if test="newBankTel != null">new_bank_tel = #{newBankTel},</if><if test="oldBankTel != null">old_bank_tel = #{oldBankTel},</if><if test="newOutLogisticsProviderInfoId != null">new_out_logistics_provider_info_id = #{newOutLogisticsProviderInfoId},</if><if test="oldOutLogisticsProviderInfoId != null">old_out_logistics_provider_info_id = #{oldOutLogisticsProviderInfoId},</if></trim>where om_term_info_id = #{omTermInfoId}</update><delete id="deleteShipInfoChangeByOmTermInfoId" parameterType="Long">delete from ship_info_change where om_term_info_id = #{omTermInfoId}</delete><delete id="deleteShipInfoChangeByOmTermInfoIds" parameterType="String">delete from ship_info_change where om_term_info_id in<foreach item="omTermInfoId" collection="array" open="(" separator="," close=")">#{omTermInfoId}</foreach></delete>
</mapper>

2.3.3 报的错误

19:38:33.049 [restartedMain] INFO  c.r.RuoYiApplication - [logStarting,55] - Starting RuoYiApplication using Java 21.0.1 on fst with PID 1456 (E:\project1\mybatis-generator-gui-master\production-system\production-system-master\ruoyi-admin\target\classes started by feng in E:\project1\mybatis-generator-gui-master\production-system)
19:38:33.052 [restartedMain] DEBUG c.r.RuoYiApplication - [logStarting,56] - Running with Spring Boot v2.5.15, Spring v5.3.33
19:38:33.052 [restartedMain] INFO  c.r.RuoYiApplication - [logStartupProfileInfo,686] - The following 1 profile is active: "druid"
19:38:33.053 [background-preinit] INFO  o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 6.2.5.Final
19:38:35.560 [restartedMain] INFO  o.a.c.c.AprLifecycleListener - [log,173] - Loaded Apache Tomcat Native library [1.2.39] using APR version [1.7.4].
19:38:35.561 [restartedMain] INFO  o.a.c.c.AprLifecycleListener - [log,173] - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
19:38:35.561 [restartedMain] INFO  o.a.c.c.AprLifecycleListener - [log,173] - APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
19:38:35.582 [restartedMain] INFO  o.a.c.c.AprLifecycleListener - [log,173] - OpenSSL successfully initialized [OpenSSL 3.0.11 19 Sep 2023]
19:38:35.595 [restartedMain] INFO  o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-8080"]
19:38:35.595 [restartedMain] INFO  o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
19:38:35.596 [restartedMain] INFO  o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/9.0.75]
19:38:35.779 [restartedMain] INFO  o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
19:38:36.364 [restartedMain] DEBUG c.r.f.s.f.JwtAuthenticationTokenFilter - [init,242] - Filter 'jwtAuthenticationTokenFilter' configured for use
19:38:38.517 [restartedMain] INFO  c.a.d.p.DruidDataSource - [init,1002] - {dataSource-1} inited
19:38:39.011 [restartedMain] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - [refresh,599] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'captchaController': Unsatisfied dependency expressed through field 'configService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigServiceImpl': Unsatisfied dependency expressed through field 'configMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigMapper' defined in file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\ruoyi-system\target\classes\com\ruoyi\system\mapper\SysConfigMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/ruoyi/framework/config/MyBatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.io.IOException: Failed to parse mapping resource: 'file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\Shipping_lists\target\classes\mapper\list\ShipInfoChangeMapper.xml]'
19:38:39.011 [restartedMain] INFO  c.a.d.p.DruidDataSource - [close,2204] - {dataSource-1} closing ...
19:38:39.015 [restartedMain] INFO  c.a.d.p.DruidDataSource - [close,2277] - {dataSource-1} closed
19:38:39.033 [restartedMain] INFO  o.a.c.c.StandardService - [log,173] - Stopping service [Tomcat]
19:38:39.066 [restartedMain] ERROR o.s.b.SpringApplication - [reportFailure,870] - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'captchaController': Unsatisfied dependency expressed through field 'configService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigServiceImpl': Unsatisfied dependency expressed through field 'configMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigMapper' defined in file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\ruoyi-system\target\classes\com\ruoyi\system\mapper\SysConfigMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/ruoyi/framework/config/MyBatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.io.IOException: Failed to parse mapping resource: 'file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\Shipping_lists\target\classes\mapper\list\ShipInfoChangeMapper.xml]'at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:713)at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:693)at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:408)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209)at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780)at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:453)at org.springframework.boot.SpringApplication.run(SpringApplication.java:343)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1370)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1359)at com.ruoyi.RuoYiApplication.main(RuoYiApplication.java:18)at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)at java.base/java.lang.reflect.Method.invoke(Method.java:580)at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigServiceImpl': Unsatisfied dependency expressed through field 'configMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigMapper' defined in file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\ruoyi-system\target\classes\com\ruoyi\system\mapper\SysConfigMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/ruoyi/framework/config/MyBatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.io.IOException: Failed to parse mapping resource: 'file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\Shipping_lists\target\classes\mapper\list\ShipInfoChangeMapper.xml]'at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:713)at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:693)at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:408)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209)at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:710)... 23 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigMapper' defined in file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\ruoyi-system\target\classes\com\ruoyi\system\mapper\SysConfigMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/ruoyi/framework/config/MyBatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.io.IOException: Failed to parse mapping resource: 'file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\Shipping_lists\target\classes\mapper\list\ShipInfoChangeMapper.xml]'at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1534)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1417)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209)at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:710)... 37 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/ruoyi/framework/config/MyBatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.io.IOException: Failed to parse mapping resource: 'file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\Shipping_lists\target\classes\mapper\list\ShipInfoChangeMapper.xml]'at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:646)at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:626)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209)at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1519)... 48 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.io.IOException: Failed to parse mapping resource: 'file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\Shipping_lists\target\classes\mapper\list\ShipInfoChangeMapper.xml]'at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:641)... 61 common frames omitted
Caused by: java.io.IOException: Failed to parse mapping resource: 'file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\Shipping_lists\target\classes\mapper\list\ShipInfoChangeMapper.xml]'at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:700)at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:577)at org.mybatis.spring.SqlSessionFactoryBean.getObject(SqlSessionFactoryBean.java:720)at com.ruoyi.framework.config.MyBatisConfig.sqlSessionFactory(MyBatisConfig.java:130)at com.ruoyi.framework.config.MyBatisConfig$$EnhancerBySpringCGLIB$$ebba123a.CGLIB$sqlSessionFactory$0(<generated>)at com.ruoyi.framework.config.MyBatisConfig$$EnhancerBySpringCGLIB$$ebba123a$$FastClassBySpringCGLIB$$74fc26c.invoke(<generated>)at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)at com.ruoyi.framework.config.MyBatisConfig$$EnhancerBySpringCGLIB$$ebba123a.sqlSessionFactory(<generated>)at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)at java.base/java.lang.reflect.Method.invoke(Method.java:580)at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)... 62 common frames omitted
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:\project1\mybatis-generator-gui-master\production-system\production-system-master\Shipping_lists\target\classes\mapper\list\ShipInfoChangeMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'TmsTb01'.  Cause: java.lang.ClassNotFoundException: Cannot find class: TmsTb01at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:128)at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:100)at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:698)... 73 common frames omitted
Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'TmsTb01'.  Cause: java.lang.ClassNotFoundException: Cannot find class: TmsTb01at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:118)at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:270)at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:262)at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:254)at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:124)... 75 common frames omitted
Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'TmsTb01'.  Cause: java.lang.ClassNotFoundException: Cannot find class: TmsTb01at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:128)at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:150)at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116)... 79 common frames omitted
Caused by: java.lang.ClassNotFoundException: Cannot find class: TmsTb01at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:226)at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:103)at org.apache.ibatis.io.Resources.classForName(Resources.java:322)at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:124)... 81 common frames omitted进程已结束,退出代码为 1

2.4 解决了的问题

2.4.1 xml中 type=、parameterType=报错,见图(这是修改过的了)

在这里插入图片描述
在这里插入图片描述

2.4.2 在我们的实体类上面增加一个注解@Alias(“TmsTb01”):

在这里插入图片描述

2.4.3 @Alias(我的理解是别名)

使用前提
在配置文件中配置 type-aliases-package 告诉spring boot (项目)你改别名的包是哪里
如:type-aliases-package: com.ye.test.pojo

实体类使用方法

@Alias("oppo")
public class Teacher {private Integer id;private String name;

mapper.xml 使用方法
mapper.xml 文件中可以直接使用 oppo,代替 com.ye.test.pojo.Teacher
如:javaType=“oppo” resultType=“oppo” parameterType=“oppo”

注意:使用@Alias 起别名之后,mapper.xml 文件 不能再使用 Teacher/teacher,但可以使用全类名 com.ye.test.pojo.Teacher

2.5 使用mybatis-generator (没咋看懂,还有git上的代码生成器,和若依差不多。)

大佬的:
https://blog.csdn.net/qq_43813351/article/details/119913372
https://developer.aliyun.com/article/1463287

三、gitee

1 为什么使用到gitee了

因为我们小组开发,还使用到了gitee来进行代码的整理和下放,很久之前在黑马的视频里面使用过gitee对自己的代码进行推,拉,合并,今天重温一下。主要的使用场景还是在idea里面。

2 gitee的登录和创建仓库以及邀请组员

2.1 gitee官网:https://gitee.com/

2.2 然后创建仓库:

在这里插入图片描述
根据需求进行创建
在这里插入图片描述

2.3 邀请组员

打开自己的仓库,点击管理,然后仓库成员管理

在这里插入图片描述
然后就可以根据链接和二维码进行分享和邀请了!!!

2.4 推拉数据

推数据:
在这里插入图片描述
拉数据
在这里插入图片描述
从头拉项目
在这里插入图片描述
在这里插入图片描述

四、前端vue的下载修复和启动

被组员吐槽了,是一点前端不会啊哈哈哈

1 运行和下载npm run dev、npm install

在这里插入图片描述

2 下载完进行修复npm audit fix(好习惯!)

在这里插入图片描述

3 npm audit和npm audit fix的不同:

npm audit安全漏洞的扫描器
npm audit fix:自动修复漏洞的利器
npm audit fix要慎重使用,这个命令可能会引发依赖问题,比如A包依赖B包,结果B包强制更新后,A包的依赖找不到了。
所以,搭配使用:
我们来看一个具体的例子。假设你的项目中有一个名为“express”的依赖包,但是这个包存在一个已知的安全漏洞。当你运行npm audit时,它会报告这个漏洞并给出相应的警告信息。接下来,你就可以查看升级之后,是否会造成其他冲突,然后尝试运行npm audit fix来自动修复这个问题。系统会自动更新“express”依赖包的版本,将其升级到一个没有安全漏洞的版本。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/869325.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

重塑智慧生活想象 Yeelight易来举行2024年战略及新品发布会圆满成功

7月9日&#xff0c;智能照明品牌Yeelight易来在广州举行“光为境和无界”——2024年Yeelight易来战略&新品发布会&#xff0c;此次发布会不仅展示了易来在新的一年中取得的显著业绩增长&#xff0c;还发布了多款引领行业潮流的智能新品。同时&#xff0c;发布会还邀请了权威…

如何学好C++?

首先&#xff0c;对于零基础的想学习C的同学&#xff0c;我想要你们先明白一件事&#xff1a;C是一门极为复杂且难以掌握的编程语言。因此推荐在学习C之前可以先去学习C语言&#xff0c;在拥有了一定的知识储备和编程能力后再学习C会更加的高效和相对轻松。 下面推荐从三个方面…

gitee及git的简单使用、下载教(保姆级教程)

前言&#xff1a; GitHub&#xff0c;一个由外国研发的代码开源网站&#xff0c;我们可以通过它获得别人优秀的项目源码&#xff0c;也可以在上面上传自己的劳动成果。但是&#xff0c;我们很难访问外网。于是&#xff0c;我们将目光转向国内一个类似的网站---码云&#xff08…

静态路由配置注意事项及黑洞路由的使用

静态路由 1 . 定义 从管理员处学习到的数据转发路径&#xff0c;就称为静态路由。 2 . 路由表 Proto &#xff1a;协议&#xff08; Protocol &#xff09; Direct — 直连链路Static — 静态路由RIP 、OSPF 等 — 动态路由 Pre : 优先级&#xff08; Preference &#x…

设计模式之职责链模式(Chain of Responsibility Pattern)

1.概念 职责链模式&#xff08;Chain of Responsibility Pattern&#xff09;&#xff1a;避免将请求发送者与接收者耦合在一起&#xff0c;让多个对象都有机会接收请求&#xff0c;将这些对象连接成一条链&#xff0c;并且沿着这条链传递请求&#xff0c;直到有对象处理它为止…

搞清楚[继承],易如反掌

穷不失义&#xff0c;达不离道。——孔丘《论语》 继承 1、简单理解2、继承2、1、继承的概念2、2、继承定义2、3、基类和派生类对象赋值转换2、4、继承中的作用域2、5、派生类默认成员函数2、6、继承中的特点2、6、1、友元2、6、2、静态成员2、6、3、菱形继承及菱形虚拟继承 3、…

html H5 dialog弹窗学习,实现弹窗显示内容 替代confirm、alert

html H5 dialog弹窗学习,实现弹窗内容 替代confirm 框架使用的mui,使用mui.confirm() 弹窗内容过多时,弹窗被撑的到屏幕外去了,使用H5 dialog 标签自定义一个固定大小的弹窗,内容过多时可下拉显示 效果展示 隐私政策内容很多,可以下拉显示 代码 myDialog.css dialog{p…

【深度学习基础】MacOS PyCharm连接远程服务器

目录 一、需求描述二、建立与服务器的远程连接1. 新版Pycharm的界面有什么不同&#xff1f;2. 创建远程连接3. 建立本地项目与远程服务器项目之间的路径映射4.设置保存自动上传文件 三、设置解释器总结 写在前面&#xff0c;本人用的是Macbook Pro&#xff0c; M3 MAX处理器&am…

PointNet——源码调试(模型训练+可视化测试显示)

因为项目涉及到3D点云项目&#xff0c;故学习下PointNet这个用来处理点云的神经网络 论文的话&#xff0c;大致都看了下&#xff0c;网络结构有了一定的了解&#xff0c;本博文主要为了下载调试PointNet网络源码&#xff0c;训练和测试调通而已。 我是在Anaconda下创建一个新的…

【C++知识点总结全系列 (08)】:面向对象编程OOP

这里写目录标题 1、OOP概述(1)面向对象四大特征A.抽象B.封装C.继承D.多态 (2)构造函数A.What&#xff08;什么是构造函数&#xff09;B.Why&#xff08;构造函数的作用&#xff09;C. Which&#xff08;有哪些构造函数&#xff09; (3)析构函数A.What&#xff08;什么是析构函数…

【YOLOv8系列】(一)YOLOv8介绍:实时目标检测的最新突破

目录 引言 背景与发展历程 YOLOv8架构设计 1. 改进的特征提取网络 2. 多尺度特征融合 3. 新的激活函数 4. Attention机制 模型训练与优化 性能评估 应用案例 目标检测 图像分割 图像分类 姿势估计 旋转框检测&#xff08;OBB&#xff09; 优势与挑战 优势&…

SAP PS学习笔记03 - 批量更改Project(CNMASS),批量创建Project(CNMASSCREATE)

上一章讲了网络&#xff08;Network&#xff09;&#xff0c;活动&#xff08;Activity&#xff09;&#xff0c;PS长文本&#xff0c; PS文书&#xff08;凭证&#xff09;&#xff0c;里程碑&#xff08;Milestone&#xff09;的创建等相关知识。 SAP PS学习笔记02 - 网络&a…

中西部公关新篇章:赛氪网赋能新质生产力赛事,引领行业潮流

2024年7月7日&#xff0c;武汉光谷盛况空前&#xff0c;中西部公共关系协会共同体多边合作平台&#xff08;以下简称“共同体”&#xff09;举办了2024年度中西部公关协会会长、秘书长专题交流会&#xff0c;本次会议主题为“加快新质生产力&#xff0c;推进公关行业新格局&…

思维+数学,CF 1138B - Circus

一、题目 1、题目描述 2、输入输出 2.1输入 2.2输出 3、原题链接 1138B - Circus 二、解题报告 1、思路分析 设第一组会小丑和杂技的人数分别为x1, y1 第二组会小丑和杂技的人数分别为x2, y2 显然根据要求有&#xff1a; x1 y2 > x1 x2 x2 y2 上式说明第二组每…

213.贪心算法:跳跃游戏||(力扣)

class Solution { public:int jump(vector<int>& nums) {if (nums.size() 1) return 0; // 如果数组长度为1&#xff0c;已经在终点&#xff0c;不需要跳跃int cur 0; // 当前跳跃能到达的最远位置int flag 0; // 记录跳跃次数int next 0; // 下一次跳跃能到…

0302GPIO外设输入功能

GPIO外设输入功能 输入部分硬件电路按键简介传感器模块简介按键和传感器模块的硬件电路 C语言的学习C语言数据类型宏定义typedef结构体枚举C语言知识总结 按键控制LED灯&光敏传感器蜂鸣器GPIO总结GPIO使用方法总结模块化编程的方法&#xff1a; 两个程序&#xff1a;按键控…

PostgreSQL 里怎样解决多租户数据隔离的性能问题?

文章目录 一、多租户数据隔离的性能问题分析&#xff08;一&#xff09;大规模数据存储和查询&#xff08;二&#xff09;并发访问和锁争用&#xff08;三&#xff09;索引维护成本高&#xff08;四&#xff09;资源分配不均 二、解决方案&#xff08;一&#xff09;数据分区&a…

计算理论复习

1.Turing Machine 确定性图灵机 图灵机有很多不同的定义&#xff0c;这里选取其中一种&#xff0c;其它定义下的图灵机往往与下面这种定义的图灵机计算能力等价。 图灵机是一个在一条可双向无限延伸且被划分为若干格子的纸带上进行操作的机器&#xff0c;其有内部状态&#…

Springboot项目实训--day2

今天学习的是idea和MySQL的连接&#xff0c;以及一些基本的增删改查的功能实现。 一、软件下载 昨天下载了idea&#xff0c;今天要是西安它们的连接&#xff0c;就需要再下载MySQL&#xff0c;我的MySQL是前面几个学期别人帮忙下载的&#xff0c;所以具体的操作步骤我也不清楚…

基于Java+SpringMvc+Vue技术的智慧校园系统设计与实现

博主介绍&#xff1a;硕士研究生&#xff0c;专注于信息化技术领域开发与管理&#xff0c;会使用java、标准c/c等开发语言&#xff0c;以及毕业项目实战✌ 从事基于java BS架构、CS架构、c/c 编程工作近16年&#xff0c;拥有近12年的管理工作经验&#xff0c;拥有较丰富的技术架…