|
使用JeecgOneGUI 生成代码以后,代码没有任何问题,也没有报错,可是配置好菜单并且授权给admin后,访问页面就报告404错误。以下是我的配置信息,请高手有时间指点一下,谢谢。
source_root_package=src
webroot_package=WebRoot
#bussi_package[User defined]
bussi_package=jeecg.test
帖子有人说配置spring-mvc.xml和spring-mvc-hibernate.xml,我也配了,如下:
spring-mvc.xml:
<!-- 加载controller的时候,不加载service,因为此时事物并未生效,若此时加载了service,那么事物无法对service进行拦截 -->
<context:component-scan base-package="org.jeecgframework.web.*">
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Service" />
</context:component-scan>
<context:component-scan base-package="jeecg.test.*">
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Service" />
</context:component-scan>
<!-- ApplicationContext -->
<bean class="org.jeecgframework.core.util.ApplicationContextUtil"></bean>
spring-mvc-hibernate.xml:
<!-- 自动扫描dao和service包(自动注入) -->
<context:component-scan base-package="org.jeecgframework.core.common.dao.*" />
<context:component-scan base-package="org.jeecgframework.core.common.service.*" />
<!-- 加载service,此时要排除要controller,因为controller已经spring-mvc中加载过了 -->
<context:component-scan base-package="org.jeecgframework.web.*">
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<context:component-scan base-package="jeecg.test.*">
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>
.....
<!-- 注解方式配置 -->
<property name="packagesToScan">
<list>
<value>jeecg.test.*</value>//这个改成 <value>jeecg.test.entity.*</value>也没有用
<value>org.jeecgframework.web.system.pojo.*</value>
<value>org.jeecgframework.web.demo.entity.*</value>
<value>org.jeecgframework.web.test.entity.*</value>
<value>org.jeecgframework.web.cgform.entity.*</value>
<value>org.jeecgframework.web.cgreport.entity.*</value>
</list>
</property>
后台报错信息:
[org.springframework.web.servlet.PageNotFound]No mapping found for HTTP request with URI [/jeecg/mdwellController.do] in DispatcherServlet with name 'springMvc'
发现问题,tomcat启动时,personController都没有加载,后台启动代码如下:
[org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping]Mapped URL path [/cgAutoListController] onto handler 'cgAutoListController'
[org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping]Mapped URL path [/cgAutoListController.*] onto handler 'cgAutoListController'
[org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping]Mapped URL path [/cgAutoListController/] onto handler 'cgAutoListController'
[org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping]Mapped URL path [/cgFormBuildController] onto handler 'cgFormBuildController'
.....
但是里面没有personController,跪求各位大大怎么解决???
|
|