增加系统配置的功能
This commit is contained in:
31
src/main/resources/hibernate/SystemConfig.hbm.xml
Normal file
31
src/main/resources/hibernate/SystemConfig.hbm.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping>
|
||||
<class name="com.jsh.model.po.SystemConfig" table="jsh_systemconfig">
|
||||
<id name="id" type="java.lang.Long">
|
||||
<column name="id"/>
|
||||
<generator class="native"/>
|
||||
</id>
|
||||
<property generated="never" lazy="false" name="type" type="java.lang.String">
|
||||
<column length="50" name="type">
|
||||
<comment>类型</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property generated="never" lazy="false" name="name" type="java.lang.String">
|
||||
<column length="100" name="name">
|
||||
<comment>名称</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property generated="never" lazy="false" name="value" type="java.lang.String">
|
||||
<column length="200" name="value">
|
||||
<comment>值</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property generated="never" lazy="false" name="description" type="java.lang.String">
|
||||
<column length="100" name="description">
|
||||
<comment>描述</comment>
|
||||
</column>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -43,5 +43,6 @@
|
||||
<mapping resource="hibernate/InOutItem.hbm.xml" />
|
||||
<mapping resource="hibernate/AccountHead.hbm.xml" />
|
||||
<mapping resource="hibernate/AccountItem.hbm.xml" />
|
||||
<mapping resource="hibernate/SystemConfig.hbm.xml" />
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
<bean id="supplierService" class="com.jsh.service.basic.SupplierService">
|
||||
<property name="baseDao" ref="baseDao"/>
|
||||
<property name="supplierDao" ref="supplierDao"/>
|
||||
<property name="userBusinessDao" ref="userBusinessDao"/>
|
||||
</bean>
|
||||
<!-- spring整合struts2需要默认为request或者 prototype,不能是单例 -->
|
||||
<bean id="supplierAction" class="com.jsh.action.basic.SupplierAction" scope="prototype">
|
||||
@@ -115,6 +114,17 @@
|
||||
<property name="logService" ref="logService"/>
|
||||
</bean>
|
||||
<!--供应商配置结束 -->
|
||||
|
||||
<!--系统配置开始 -->
|
||||
<bean id="systemConfigService" class="com.jsh.service.basic.SystemConfigService">
|
||||
<property name="baseDao" ref="baseDao"/>
|
||||
</bean>
|
||||
<!-- spring整合struts2需要默认为request或者 prototype,不能是单例 -->
|
||||
<bean id="systemConfigAction" class="com.jsh.action.basic.SystemConfigAction" scope="prototype">
|
||||
<property name="systemConfigService" ref="systemConfigService"/>
|
||||
<property name="logService" ref="logService"/>
|
||||
</bean>
|
||||
<!--系统配置结束 -->
|
||||
|
||||
<!--分类配置开始 -->
|
||||
<bean id="categoryService" class="com.jsh.service.basic.CategoryService">
|
||||
@@ -255,7 +265,6 @@
|
||||
<!--经手人配置开始 -->
|
||||
<bean id="personService" class="com.jsh.service.materials.PersonService">
|
||||
<property name="baseDao" ref="baseDao"/>
|
||||
<property name="personDao" ref="personDao"/>
|
||||
</bean>
|
||||
<!-- spring整合struts2需要默认为request或者 prototype,不能是单例 -->
|
||||
<bean id="personAction" class="com.jsh.action.materials.PersonAction" scope="prototype">
|
||||
@@ -363,4 +372,5 @@
|
||||
<property name="logService" ref="logService"/>
|
||||
</bean>
|
||||
<!--账户明细配置结束 -->
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -54,4 +54,6 @@
|
||||
<bean id="accountHeadDao" parent="daoTemplate" class="com.jsh.dao.materials.AccountHeadDAO"/>
|
||||
<!-- 配置accountItemDao组件 -->
|
||||
<bean id="accountItemDao" parent="daoTemplate" class="com.jsh.dao.materials.AccountItemDAO"/>
|
||||
<!-- 配置systemConfigDAO组件 -->
|
||||
<bean id="systemConfigDAO" parent="daoTemplate" class="com.jsh.dao.basic.SystemConfigDAO"/>
|
||||
</beans>
|
||||
|
||||
11
src/main/resources/struts2/systemConfig-struts.xml
Normal file
11
src/main/resources/struts2/systemConfig-struts.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
|
||||
<struts>
|
||||
<package name="systemConfig" namespace="/systemConfig" extends="json-default">
|
||||
<action name="*" class="systemConfigAction" method="{1}">
|
||||
<result type="json"/>
|
||||
</action>
|
||||
</package>
|
||||
</struts>
|
||||
Reference in New Issue
Block a user