技术支持-代码生成spring扫描配置路径entity,dao,control
请求地址有误,请检查您的配置是否正确!可以参照下面的步骤进行相关文件的配置。 代码生成示例[*]jeecg_config文件中配置:
bussi_package=com.buss // 生成代码的包前缀 [*]代码生成时的配置:
[*]表名:guoming_test;
[*]代码分层风格:代码分层;
[*]包名:guoming;
代码生成后的工作:
第一步:配置扫描配置文件
[*]spring-mvc.xml,配置control 扫描路径<context:component-scan base-package="com.buss.*">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service" />
</context:component-scan>
[*]spring-mvc-hibernate.xml,配置service、entity扫描路径
[*]加载service,此时要排除要controller,因为controller已经spring-mvc中加载过了 <context:component-scan base-package="com.buss.*">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-scan> [*]扫描hibernate实体<property name="packagesToScan">
<list>
....
<value>com.buss.entity.*</value>
</list>
</property> 如果生成代码时,代码分层风格选择了“业务分层”,则配置文件如下:<property name="packagesToScan">
<list>
....
<value>com.buss.*.entity</value>
</list>
</property> 第二步:编辑菜单地址
[*]系统管理-->菜单管理-->录入菜单
[*]填写地址:guomingTestController.do?guomingTest
貌似照着配置了还是报同样的错误 本帖最后由 joln 于 2014-6-25 14:54 编辑
清除了一下缓存,重新配置了地址,ok了 配置后,报错:
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext 已经注入,启动时显示已经映射好了,但还是报错,找不到jsp文件 java.lang.NullPointerException
请问这是什么问题,代码生成以后配置完访问就包这样的错误 通过代码生成器生成的代码怎么都报这个错误
全局处理异常捕获:
java.lang.NullPointerException
at org.jeecgframework.core.common.dao.impl.GenericBaseCommonDao.getDataGridReturn(GenericBaseCommonDao.java:725)
at org.jeecgframework.core.common.service.impl.CommonServiceImpl.getDataGridReturn(CommonServiceImpl.java:260)
求助:生成代码并加入菜单后,list正常,但是点“编辑”后报错,前面都按说明做的,没有报错,tAcc也确实在实体中,实在是找不到原因啊:
十月 05, 2016 11:24:21 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet in context with path threw exception [An exception occurred processing JSP page /webpage/com/jwdt/testden/testden-update.jsp at line 32
29: </label>
30: </td>
31: <td class="value">
32: <input id="tAcc" name="tAcc" type="text" style="width: 150px" class="inputxt"value='${testdenPage.tAcc}'>
33: <span class="Validform_checktip"></span>
34: <label class="Validform_label" style="display: none;">账号</label>
35: </td>
Stacktrace:] with root cause
javax.el.PropertyNotFoundException: Property 'tAcc' not found on type com.jwdt.testden.entity.TestdenEntity
at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:290)
at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:243)
at javax.el.BeanELResolver.property(BeanELResolver.java:377)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:97)
at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:104)
at org.apache.el.parser.AstValue.getValue(AstValue.java:184)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:950)
at org.apache.jsp.webpage.com.jwdt.testden.testden_002dupdate_jsp._jspx_meth_t_005fformvalid_005f0(testden_002dupdate_jsp.java:247)
at org.apache.jsp.webpage.com.jwdt.testden.testden_002dupdate_jsp._jspService(testden_002dupdate_jsp.java:141)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:90)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:744)
joln 发表于 2014-6-25 12:21 static/image/common/back.gif
清除了一下缓存,重新配置了地址,ok了
哥们,你是怎么解决的啊,我也遇到这个问题了,页面报404,控制台报“ No mapping found for HTTP request with URI in DispatcherServlet with name 'springMvc'”。分享一下经验呗。先谢谢了! 逸轩居士 发表于 2017-7-20 10:35 static/image/common/back.gif
哥们,你是怎么解决的啊,我也遇到这个问题了,页面报404,控制台报“
哥们,你是怎么解决的啊,我也遇到这个问题了,页面报404,好像根本没有执行到java文件
页:
[1]
2