Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d3ae354

Browse files
Merge branch 'master' into dubbo
# Conflicts: # src/main/resources/application.yml
1 parent fd5232e commit d3ae354

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed
Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
package com.geekcattle.core.interceptor;
1+
/*
2+
* Copyright (c) 2017-2018. 放牛极客<l_iupeiyu@qq.com>
3+
* <p>
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
* </p>
14+
*
15+
*/
16+
17+
package com.geekcattle.core.Interceptor;
218

319
import com.geekcattle.util.IpUtil;
420
import org.slf4j.Logger;
@@ -9,9 +25,6 @@
925
import javax.servlet.http.HttpServletRequest;
1026
import javax.servlet.http.HttpServletResponse;
1127

12-
/**
13-
* @author geekcattle
14-
*/
1528
@Component
1629
public class ResourceInterceptor extends HandlerInterceptorAdapter {
1730

@@ -21,13 +34,14 @@ public class ResourceInterceptor extends HandlerInterceptorAdapter {
2134
@Override
2235
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
2336
throws Exception {
24-
if(logger.isDebugEnabled()){
25-
Stringuri = request.getRequestURI();
26-
logger.info(uri);
27-
logger.info("UserAgent: {}", request.getHeader(USER_AGENT));
28-
logger.info("用户访问地址: {}, 来路地址: {}", uri, IpUtil.getIpAddr(request));
29-
}
37+
Stringuri = request.getRequestURI();
38+
logger.info(uri);
39+
logger.info("UserAgent: {}", request.getHeader(USER_AGENT));
40+
logger.info("用户访问地址: {}, 来路地址: {}", uri, IpUtil.getIpAddr(request));
41+
42+
3043
return true;
44+
//return super.preHandle(request, response, handler);
3145
}
3246

3347
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /