zoukankan      html  css  js  c++  java
  • OpenFeign添加日志信息

    配置OpenFeign的日志bean;

    在目录下写创建config包写config文件

    import feign.Logger;
    import org.springframework.context.annotation.Bean;
    import org.springframework.context.annotation.Configuration;
    
    @Configuration
    public class FeignConfig {
        @Bean
        Logger.Level feignLoggerLevel(){
            return Logger.Level.FULL;
        }
    }
    

    配置去application.yml里面开启

    logging:
       level:
        com.gizwits.glive.modules.system.service.ISysPermissionServiceApi: debug
        com.gizwits.glive.modules.system.service.ISysRoleServiceApi: debug
        com.gizwits.glive.modules.system.service.ISysRoleToPermissionServiceApi: debug
        com.gizwits.glive.modules.system.service.ISysUserSecurityServiceApi: debug
        com.gizwits.glive.modules.system.service.ISysUserServiceApi: debug
        com.gizwits.glive.modules.system.service.ISysUserToRoleServiceApi: debug
    

    测试

    远程调用信息

    POST http://localhost:8023/ms/sys_user/login/username HTTP/1.1
    Content-Length: 145
    Content-Type: application/json
    
    {"appKey":"02e927bb7757be0465d87bc2dd05adbc","version":"0.1","type":"appId","data":{"username":"XXX","password":"xxxx","code":"string"}}
    END HTTP (145-byte body)
    
  • 相关阅读:
    MVC3 验证码
    说说.NET反编译工具
    HTTP协议学习
    Spring Web Flow 的优缺点
    Java CLASSPATH 引发的问题
    MySQL 高级
    Java Policy
    AJAX
    数据结构与算法学习资源
    C#学习资源
  • 原文地址:https://www.cnblogs.com/hnxbp/p/14963303.html
Copyright © 2011-2022 走看看