Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-demo-single
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gic_demo
gic-demo-single
Commits
fc443230
Commit
fc443230
authored
Jul 12, 2019
by
朱瑞泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
强制使用log4j2输出日志
parent
17407f5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
AuthcenterTestController.java
.../demo/single/web/controller/AuthcenterTestController.java
+3
-3
DemoProjectController.java
...gic/demo/single/web/controller/DemoProjectController.java
+3
-3
GlobalExceptionHandler.java
...gic/demo/single/web/exception/GlobalExceptionHandler.java
+4
-3
No files found.
gic-demo-single-web/src/main/java/com/gic/demo/single/web/controller/AuthcenterTestController.java
View file @
fc443230
...
...
@@ -3,8 +3,8 @@ package com.gic.demo.single.web.controller;
import
com.alibaba.fastjson.JSON
;
import
com.gic.authcenter.sdk.GicAuthcenterManager
;
import
com.gic.authcenter.sdk.exception.NoTokenCacheException
;
import
org.
slf4j.Log
ger
;
import
org.
slf4j.LoggerFactory
;
import
org.
apache.logging.log4j.LogMana
ger
;
import
org.
apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
@@ -21,7 +21,7 @@ import java.io.IOException;
@RestController
public
class
AuthcenterTestController
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
()
);
private
final
Logger
logger
=
LogManager
.
getLogger
(
AuthcenterTestController
.
class
);
@Autowired
private
GicAuthcenterManager
gicAuthcenterManager
;
...
...
gic-demo-single-web/src/main/java/com/gic/demo/single/web/controller/DemoProjectController.java
View file @
fc443230
...
...
@@ -8,8 +8,8 @@ import com.gic.demo.single.api.service.DemoStoreApiService;
import
com.gic.demo.single.web.exception.GicDemoErrCode
;
import
com.gic.demo.single.web.vo.DemoStoreVO
;
import
org.apache.commons.lang.StringUtils
;
import
org.
slf4j.Log
ger
;
import
org.
slf4j.LoggerFactory
;
import
org.
apache.logging.log4j.LogMana
ger
;
import
org.
apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"/demo"
)
public
class
DemoProjectController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
DemoProjectController
.
class
);
private
final
Logger
logger
=
LogManager
.
getLogger
(
DemoProjectController
.
class
);
@Autowired
private
DemoStoreApiService
demoStoreApiService
;
...
...
gic-demo-single-web/src/main/java/com/gic/demo/single/web/exception/GlobalExceptionHandler.java
View file @
fc443230
package
com
.
gic
.
demo
.
single
.
web
.
exception
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
org.
slf4j.Log
ger
;
import
org.
slf4j.LoggerFactory
;
import
org.
apache.logging.log4j.LogMana
ger
;
import
org.
apache.logging.log4j.Logger
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -18,7 +18,8 @@ import java.io.PrintWriter;
*/
@ControllerAdvice
public
class
GlobalExceptionHandler
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
GlobalExceptionHandler
.
class
);
private
final
Logger
logger
=
LogManager
.
getLogger
(
GlobalExceptionHandler
.
class
);
@ResponseBody
@ExceptionHandler
(
Exception
.
class
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment