zoukankan      html  css  js  c++  java
  • 项目中的bug

    第一个bug

    这个bug 是启动进项目时就有的,也就是找不到路径。可是我只做的单个模块,那么怎么会连一个整的项目都进不去呢?

    Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [D:TOMCATapache-tomcat-8.0.33webappsox-dmsWEB-INFclassesspring-mvc-hibernate.xml]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'activityService' for bean class [com.chwis.box.activity.service.impl.ActivityServiceImpl] conflicts with existing, non-compatible bean definition of same name and class [com.chwis.box.activity.activitylist.service.impl.ActivityServiceImpl]
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414)

    对应的bug就是这个看到了没,这个就是service层的冲突。那么怎么解决呢?原来我把service复制到了不同的文件夹里面,导致他们出现冲突。只要删除一个就好了。

    第二个异常

     [org.jeecgframework.core.common.exception.GlobalExceptionResolver:86] 全局处理异常捕获:
    java.lang.NoSuchMethodException: Unknown property 'bMemberId'
    at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1122)
    at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:408)


    项目用的是ssh,这个他是用的多表查询,然后 在数据库映射里面没有bMemberId这个,而是直接把MemberId 映射的member对象。
     
    这个异常就是因为项目用的是easyui 的框架和jeecg这个框架。所以他的jsp和controller,service 以及实体类都是自动生成的。他还有另外几个实体类,分别是:前端到后台请求封装的实体类1号,以及后台和java实体类是一个映射关系的实体类2号,还有java实体类和数据库表之间的实体类3号。那么当他2号和三号对不会上时就会出现找不到这个类的异常。
    还有几个异常不过都是实体类之间映射的问题。所以先不做赘述。解决办法就是利用注解把2 号和3号关联起来。
    这个感觉要熟悉这个框架的原码,还要熟悉Hibernate。
     
    下来总结这个我做的模块。
    1 奖品模块,这个就涉及到一个增删查改。到没有什么特别的。
    2 会员---奖品会员---然后再到活动详情页面。 中间有个点就是如何设置按钮,还有如何根据活动id查询活动,因为活动不是主键所以需要前端知识,不如重写封装的函数。
     
     
     
     
  • 相关阅读:
    chromedriver与chrome各版本及下载地址
    chromedriver和firefox driver的安装过程
    ubuntu python及python IDLE 的安装
    Ubuntu14.04安装及配置mysql5.7.19
    容器集群管理平台的比较
    Android调试神器stetho使用详解和改造
    Vue CLI 3搭建vue+vuex 最全分析
    不会PPT配色没关系,有这些配色网站,也能让你的PPT配色美到极致
    15个超赞的配色网站,建议收藏
    10个超好用的配色网站
  • 原文地址:https://www.cnblogs.com/houdong-now/p/7570843.html
Copyright © 2011-2022 走看看