Blame view

service-api/src/main/java/com/java110/api/configuration/ServiceConfiguration.java 9.48 KB
88e030b7   王彪总   init project
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
  package com.java110.api.configuration;
  
  import com.java110.api.filter.JwtFilter;
  import org.springframework.boot.web.servlet.FilterRegistrationBean;
  import org.springframework.boot.web.servlet.MultipartConfigFactory;
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  
  import javax.servlet.MultipartConfigElement;
  
  /**
   * Created by wuxw on 2018/5/2.
   */
  @Configuration
  public class ServiceConfiguration {
  
      @Bean
      public MultipartConfigElement multipartConfigElement() {
          MultipartConfigFactory factory = new MultipartConfigFactory();
          //文件最大
          factory.setMaxFileSize(1024*1024*50); //KB,MB
          /// 设置总上传数据总大小
          factory.setMaxRequestSize(1024*1024*50);
          return factory.createMultipartConfig();
      }
      @Bean
      public FilterRegistrationBean jwtFilter() {
          StringBuffer exclusions = new StringBuffer();
          exclusions.append("/callComponent/login/*,");
          exclusions.append("/app/ext/992020051967020024/query_token,");
          exclusions.append("/callComponent/register/*,");
          exclusions.append("/callComponent/validate-code/*,");
          exclusions.append("/callComponent/validate-tel/*,");
          exclusions.append("/flow/login,");
          exclusions.append("/flow/register,");
          exclusions.append("/flow/advertVedioFlow,");//放开 广告页面是不需要登录的
          exclusions.append("/callComponent/advertVedioView/*,");//放开 广告页面是不需要登录的
          exclusions.append("/callComponent/download/getFile/file,");//放开 下载图片也不需要登录
          exclusions.append("/callComponent/download/getFile/fileByObjId,");//放开 下载图片也不需要登录
          exclusions.append("/callComponent/upload/uploadVedio/upload,");
          exclusions.append("/app/payment/notify,");//微信支付通知
          exclusions.append("/app/payment/notify/*,");// 通用通知放开
          exclusions.append("/app/payment/notifyChinaUms,");//银联支付回调
          exclusions.append("/app/payment/rentingNotify,");//微信支付通知
          exclusions.append("/app/payment/oweFeeNotify,");//欠费微信支付通知
          exclusions.append("/app/payment/oweFeeNotifyChinaUms,");//欠费银联支付回调
          exclusions.append("/app/payment/toPayTempCarFee,");//欠费银联支付回调
          exclusions.append("/app/payment/tempCarFeeNotifyUrl,");//欠费银联支付回调
          exclusions.append("/app/notice.queryPhoneNotice,");//通知放开登录
          exclusions.append("/app/tempCarFee.getTempCarFeeOrder,");//通知放开登录
          exclusions.append("/goods/notify,");//商品购买通知
          exclusions.append("/app/loginWx,");// 登录跳过
          exclusions.append("/app/getWxPhoto,");// 登录跳过
          exclusions.append("/app/loginProperty,");// 物业APP登录跳过
          exclusions.append("/app/loginOwner,");// 业主APP登录跳过
          exclusions.append("/app/loginOwnerByKey,");// 根据key登录业主
          exclusions.append("/app/user.ownerUserLogin,");// 业主登录(新)
          exclusions.append("/app/login.phoneWechatLogin,");// 微信一键登陆
          exclusions.append("/app/area.listAreas,");// 加载地区
9750b443   王彪总   fix(config): 更新配置...
60
          exclusions.append("/app/community.listCommunitys,");// 加载项目
88e030b7   王彪总   init project
61
62
63
          exclusions.append("/app/user.userSendSms,");// 发送短信验证码
          exclusions.append("/app/owner.ownerRegister,");// 业主注册
          exclusions.append("/app/owner.ownerRegisterWxPhoto,");// 业主注册
9750b443   王彪总   fix(config): 更新配置...
64
65
          exclusions.append("/app/activities.listActivitiess,");//项目广告
          exclusions.append("/app/advert.listAdvertPhoto,");//项目广告图片
88e030b7   王彪总   init project
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
          exclusions.append("/app/junkRequirement.listJunkRequirements,");//市场
          exclusions.append("/app/wechat/gateway/*,");//微信公众号对接接口
          exclusions.append("/app/loginOwnerWechatAuth,");//微信公众号对接接口
          exclusions.append("/app/refreshToken,");//微信公众号对接接口
          exclusions.append("/app/refreshOpenId,");//微信公众号对接接口
          exclusions.append("/app/openServiceNotifyOpenId,");//微信公众号对接接口
          exclusions.append("/app/renting/queryRentingPool,");//微信公众号对接接口
          exclusions.append("/app/activitiesType/queryActivitiesType,");//查询大类
          exclusions.append("/app/product/queryProductLabel,");//查询大类
          exclusions.append("/app/loginStaffWechatAuth,");//查询大类
          exclusions.append("/app/reportInfoSetting/queryReportInfoSetting,");//查询疫情
          exclusions.append("/app/reportInfoSettingTitle/querySettingTitle,");//查询疫情问卷详情
          exclusions.append("/app/reportInfoBackCity/saveReportInfoBackCity,");//返省人员信息上报
          exclusions.append("/app/reportInfoAnswerValue/saveReportInfoAnswerValue,");//保存疫情问卷
          exclusions.append("/app/staffAuth,");//查询大类
          //这里不允许开放数据安全问题
  //        exclusions.append("/app/floor.queryFloors,");
  //        exclusions.append("/app/unit.queryUnits,");
  //        exclusions.append("/app/room.queryRooms,");
          exclusions.append("/app/room.queryRoomsByApp,");
          exclusions.append("/app/productCategory/queryMainCategoryAllGoods,");
          exclusions.append("/app/mall.queryMainCategory,");
  
          exclusions.append("/app/mall.queryPhoneMainCategoryProduct,");
  
          exclusions.append("/app/shop/queryShopCommunity,");
          exclusions.append("/app/mall.queryShopType,");
          exclusions.append("/app/mall.queryHousekeepingType,");
          exclusions.append("/app/couponUser.listCouponUser,");
          exclusions.append("/app/machine.customCarInOutCmd,");
          exclusions.append("/callComponent/propertyRightRegistration.savePropertyRightRegistration,");
          exclusions.append("/app/propertyRightRegistration.savePropertyRightRegistration,");
          exclusions.append("/app/system.listSystemInfo,");
          exclusions.append("/app/car.queryWaitPayFeeTempCar,");
          exclusions.append("/app/alipay.payTempCarFee,");
          exclusions.append("/app/alipay/notify/receive,");
          exclusions.append("/app/parkingCoupon.listParkingCouponCar,");
          exclusions.append("/app/marketPic.listCommunityMarketPic,");
          exclusions.append("/app/marketGoods.listCommunityMarketGoods,");
  
          exclusions.append("/app/equipmentAccount.listEquipmentAccount,");
          exclusions.append("/app/inspectionTaskDetail.listInspectionTaskDetails,");
          exclusions.append("/app/maintainanceTask.listMaintainanceTaskDetail,");
          exclusions.append("/app/parkingCoupon.saveParkingCouponCar,");
          exclusions.append("/app/reserve.listReserveCatalog,");
          exclusions.append("/app/reserve.listReserveGoods,");
          exclusions.append("/app/reserve.listReserveParams,");
          exclusions.append("/app/mall.listProductGroup,");//拼团商品
          exclusions.append("/app/product/queryGroupProduct,");//拼团商品
          exclusions.append("/app/product/querySeckillProduct,");//秒杀商品
  
          exclusions.append("/app/mall.listProductSeckill,");//秒杀商品
          exclusions.append("/app/system.listRegisterProtocol,");//查询注册信息
          exclusions.append("/app/chargeMachine.listChargeMachine,");//查询注册信息
          exclusions.append("/app/chargeMachine.listChargeMachinePort,");//查询充电桩
          exclusions.append("/app/smartMeter/notify/*,");// 智能水电表通知放开
          exclusions.append("/app/equipments/*,");// 叮叮充电桩通知放开
          exclusions.append("/app/charge/*,");// 通用充电桩通知放开
          exclusions.append("/app/login.pcUserLogin,");// 放开接口登录
          exclusions.append("/app/login.accessTokenLogin,");// 放开接口登录
          exclusions.append("/app/login.getAccessToken,");// 放开接口登录
          exclusions.append("/app/user.ownerUserLoginByOpenId,");// 放开接口登录
          // todo 静态二维码支付 相关接口放开
          exclusions.append("/app/payFeeQrcode.getQrcodeConfig,");// 放开接口登录
          exclusions.append("/app/user.ownerSendSms,");// 向业主发送验证码
          exclusions.append("/app/owner.getQrcodeOwner,");// 根据二维码查询业主信息
          exclusions.append("/app/payFeeQrcode.getQrcodeOweFees,");// 根据二维码查询业主欠费
          exclusions.append("/app/wechat.getWechatMiniOpenId,");// 根据二维码查询业主欠费
9750b443   王彪总   fix(config): 更新配置...
134
          exclusions.append("/app/wechat.getCommunityWechatAppId,");// 查询项目微信appID
88e030b7   王彪总   init project
135
136
137
138
          exclusions.append("/app/payment.cashier,");// 收银接口
          exclusions.append("/app/fee.queryFeeDetail,");// 缴费明细
          exclusions.append("/app/payment.getNativeQrcodePayment,");// 获取二维码信息
          exclusions.append("/app/fee.listOwnerTelOweFee,");// 根据手机号查询欠费
9750b443   王彪总   fix(config): 更新配置...
139
          exclusions.append("/app/mall.queryCommunityRecommend,");// 查询项目推荐
88e030b7   王彪总   init project
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
          exclusions.append("/app/file/userfile/download/*,");// 下载文件
  
  
  
          exclusions.append("/app/reportInfoAnswer/queryReportInfoAnswerByOpenId");
  
  
          final FilterRegistrationBean registrationBean = new FilterRegistrationBean();
          registrationBean.setFilter(new JwtFilter());
          registrationBean.addUrlPatterns("/");
          registrationBean.addUrlPatterns("/callComponent/*");
          registrationBean.addUrlPatterns("/flow/*");
          registrationBean.addUrlPatterns("/app/*");
          registrationBean.addInitParameter("excludedUri",exclusions.toString());
  
          return registrationBean;
      }
  
  }