代码生成示例
代码生成后的工作:
第一步:配置扫描配置文件
- 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>
- <context:component-scan base-package="com.buss.*">
- 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>
- <context:component-scan base-package="com.buss.*">
- 扫描hibernate实体
- <property name="packagesToScan">
- <list>
- ....
- <value>com.buss.entity.*</value>
- </list>
- </property>
- <property name="packagesToScan">
- <property name="packagesToScan">
- <list>
- ....
- <value>com.buss.*.entity</value>
- </list>
- </property>
- 系统管理-->菜单管理-->录入菜单
- 填写地址:guomingTestController.do?guomingTest