whyclj
2020-07-22 a5729100cb1eaa3584b3a194e46e1b8b52b3ed1a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
    "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
    <!-- 配置开发模式 -->
    <constant name="struts.devMode" value="false"></constant>
    
    <constant name="struts.custom.i18n.resources" value="global"/>
    
    <constant name="struts.multipart.maxSize" value ="1024000000" />
    
    <!-- 过滤websocket请求  -->
    <constant name="struts.action.excludePattern" value="/ws/.*,ws://.*"></constant>
    
    <package name="default" namespace="/" extends="json-default" >
    
        <action name="CheckClientAction_check" class="com.fgkj.actions.CheckClientAction" method="check">
            <result name="none" type="redirect">/login.jsp</result>
            <result name="success" type="redirect">/mobil/loginm.html</result>
        </action>
    
        <action name="LoginAction_*" class="com.fgkj.actions.LoginAction" method="{1}">
            <result type="json"/>
        </action>
        
        
        <action name="UserAction_*" class="com.fgkj.actions.UserAction" method="{1}">
            <result type="json"/>
        </action>
        
        <action name="RoleLimitAction_*" class="com.fgkj.actions.RoleLimitAction" method="{1}">
            <result type="json"></result>
        </action>
        
        <action name="UserRoleAction_*" class="com.fgkj.actions.UserRoleAction" method="{1}">
            <result type="json"/>
        </action>
        
        <action name="RolesAction_*" class="com.fgkj.actions.RolesAction" method="{1}">
            <result type="json"/>
        </action>
        
        <action name="LimitAction_*" class="com.fgkj.actions.LimitAction" method="{1}">
            <result type="json"/>
        </action>
        
        <action name="BattInfAction_*" class="com.fgkj.actions.BattInfAction" method="{1}">
            <result type="json"/>
        </action>
        
        <action name="Batt_rtdataAction_*" class="com.fgkj.actions.Batt_rtdataAction" method="{1}">
            <result type="json"/>
        </action>
        
        <action name="Batt_rtstateAction_*" class="com.fgkj.actions.Batt_rtstateAction" method="{1}">
            <result type="json"/>
        </action>
        <action name="Batttestdata_infAction_*" class="com.fgkj.actions.Batttestdata_infAction" method="{1}">
            <result type="json"/>
        </action>
        
        <action name="BatttestdataAction_*" class="com.fgkj.actions.BatttestdataAction" method="{1}">
            <result type="json"/>
        </action>
        
        <action name="BatttestdatastopAction_*" class="com.fgkj.actions.BatttestdatastopAction" method="{1}">
            <result type="json"/>
        </action>
        
        <action name="Batt_param_lowAction_*" class="com.fgkj.actions.Batt_param_lowAction" method="{1}">
            <result type="json"/>
        </action>
        
        <action name="Batt_maintenance_infAction_*" class="com.fgkj.actions.Batt_maintenance_infAction" method="{1}">
            <result type="json"></result>
        </action>
        
        <action name="BattresdataAction_*" class="com.fgkj.actions.BattresdataAction"  method="{1}">
            <result type="json"></result>
        </action>
        
        <action name="Battresdata_infAction_*" class="com.fgkj.actions.Battresdata_infAction" method="{1}">
            <result type="json"></result>
        </action>
        
        <action name="User_jiejiariAction_*" class="com.fgkj.actions.User_jiejiariAction" method="{1}">
            <result type="json"></result>
        </action>
        
        <action name="User_infAction_*" class="com.fgkj.actions.User_infAction" method="{1}">
            <result type="json"></result>
        </action>
        
        <action name="Batt_Maint_DealarmAction_*" class="com.fgkj.actions.Batt_Maint_DealarmAction" method="{1}">
            <result type="json"></result>
        </action>
        
        <action name="I18nAction_*" class="com.fgkj.actions.I18nAction" method="{1}">
            <result type="json"></result>
        </action>
        
        <action name="Batt_maint_infAction_*" class="com.fgkj.actions.Batt_maint_infAction" method="{1}">
            <result type="json"></result>
        </action>
        
        <action name="Hard_dev_sms_stateAction!*" class="com.fgkj.actions.ram.Hard_dev_sms_stateAction" method="{1}">
            <result type="json"></result>
        </action>
        
        <action name="*_61850action_*" class="com.fgkj.actions.bts61850.{1}" method="{2}">
            <result type="json"></result>
        </action>
        
        <action name="*_ld9action_*" class="com.fgkj.actions.Ld9.{1}" method="{2}">
            <result type="json"></result>
        </action>
        
        <action name="*_ramaction_*" class="com.fgkj.actions.ram.rt.{1}" method="{2}">
            <result type="json"></result>
        </action>
        
        <action name="*_media_*" class="com.fgkj.actions.media.{1}" method="{2}">
            <result type="json"></result>
        </action>
        
        <action name="*_action_*" class="com.fgkj.actions.ram.{1}" method="{2}">
            <result type="json"></result>
        </action>
                
        <action name="*!*" class="com.fgkj.actions.{1}" method="{2}">
            <result type="json"></result>
        </action>
        
        
        
        <action name="FileUploadAction" class="com.fgkj.actions.FileUploadAction">
              <result type="stream">
                  <param name="contentType">application/octet-stream</param>
                  <param name="inputName">inputStream</param>
                  <param name="contentDisposition">attachment;filename=${filename}</param>
                  <param name="bufferSize">4096</param>
              </result>           
      </action>
   </package>
   <package name="p1" namespace="/" extends="struts-default">
      <result-types>
        <!-- 用于处理下载文件点击取消时报出异常问题 -->
               <result-type name="streamx" class="com.sunspoter.lib.web.struts2.dispatcher.StreamResultX"></result-type>
      </result-types>
      <action name="FileDownloadAction" class="com.fgkj.actions.FileDownloadAction">
              <result type="streamx">
                  <param name="contentType">application/octet-stream</param>
                  <!-- 设置返回的输入流,在对应的Action中要有对应的getDownloadFile方法 -->
                  <param name="inputName">downloadFile</param>
                  <!-- 设置下载时文件的名称,对应Action中药有filename属性 -->
                  <param name="contentDisposition">attachment;filename=${filename}</param>
                  <!-- 设置缓冲区大小4k -->
                  <param name="bufferSize">4096</param>
                  <!-- 下载时显示下载文件的大小,Action中要有对应的String类型的属性contentLength -->
                  <param name="contentLength">${contentLength}</param>
              </result>           
      </action>
    </package>
</struts>