shiqian 3 rokov pred
rodič
commit
dd39623300

+ 1 - 0
boman-visual/boman-monitor/src/main/java/com/boman/modules/monitor/config/WebSecurityConfigurer.java

@@ -35,6 +35,7 @@ public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter
                 , adminContextPath + "/login"
                 , adminContextPath + "/actuator/**"
                 , adminContextPath + "/instances/**"
+                , adminContextPath + "/jmreport/**"
             ).permitAll()
             .anyRequest().authenticated()
             .and()

+ 4 - 2
boman-wechat/src/main/java/com/boman/wechat/config/WechatProperties.java

@@ -1,9 +1,11 @@
 package com.boman.wechat.config;
 
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.context.annotation.Configuration;
 
-@Component
+@Configuration
+@RefreshScope
 public class WechatProperties {
 
     @Value("${auth.wechat.sessionHost}")

+ 2 - 0
boman-wechat/src/main/java/com/boman/wechat/service/impl/WxPushServiceImpl.java

@@ -37,6 +37,8 @@ public class WxPushServiceImpl implements WxPushService {
      */
     @Override
     public Map<String, Object> pushToUser(WxMsgDto dto) {
+        logger.info("WxMsgDto {}", JSON.toJSONString(dto));
+        logger.info("properties {}", JSON.toJSONString(properties));
         List<Long> userIds = dto.getIds();
         Map<String, Object> params = dto.getParams();
         Map<String, Object> pushResult = new HashMap<>();

+ 8 - 7
boman-wechat/src/main/resources/application.properties

@@ -1,7 +1,8 @@
-auth.wechat.sessionHost=https://api.weixin.qq.com/sns/jscode2session
-auth.wechat.msg_url=https://api.weixin.qq.com/cgi-bin/message/subscribe/send
-auth.wechat.access_token_url=https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential
-auth.wechat.appId=wxf556d2b0c34da8cf
-auth.wechat.secret=8f90a52972268f82d5017a2ac29650c4
-auth.wechat.grantType=authorization_code
-auth.wechat.template_id=Dhunm8Bqy6lRDfYgJxYQnhKV6JxNIhFoov2MOJ0c6Dw
+#auth.wechat.sessionHost=https://api.weixin.qq.com/sns/jscode2session
+#auth.wechat.msg_url=https://api.weixin.qq.com/cgi-bin/message/subscribe/send
+#auth.wechat.access_token_url=https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential
+#auth.wechat.appId=wxf556d2b0c34da8cf
+#auth.wechat.secret=8f90a52972268f82d5017a2ac29650c4
+#auth.wechat.grantType=authorization_code
+##auth.wechat.template_id=Dhunm8Bqy6lRDfYgJxYQnhKV6JxNIhFoov2MOJ0c6Dw
+#auth.wechat.template_id=OfdPlcfvEet4A1HZm3JXm3HyX4msme_T0vO4NdKo0xc

+ 1 - 11
boman-wechat/src/main/resources/bootstrap.yml

@@ -16,14 +16,4 @@ spring:
         file-extension: yml
         shared-configs:
           - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
-        namespace: d8110874-ad03-4826-80bc-ff00126c1644  #潜山教育局
-
-auth:
-  wechat:
-    sessionHost: https://api.weixin.qq.com/sns/jscode2session
-    msg_url: https://api.weixin.qq.com/cgi-bin/message/subscribe/send
-    access_token_url: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential
-    appId: wxf556d2b0c34da8cf
-    secret: 8f90a52972268f82d5017a2ac29650c4
-    grantType: authorization_code
-    template_id: Dhunm8Bqy6lRDfYgJxYQnhKV6JxNIhFoov2MOJ0c6Dw,VwSWWdD8a_L4DFKkTGMLUF1W0XQSLd3Bdfvk
+·        namespace: d8110874-ad03-4826-80bc-ff00126c1644  #潜山教育局

+ 1 - 0
pom.xml

@@ -232,6 +232,7 @@
 		<module>boman-common</module>
 		<module>boman-web-core</module>
         <module>boman-wechat</module>
+        <module>jiaoyuju-admin</module>
     </modules>
     <packaging>pom</packaging>