codej99 / springrestapi Goto Github PK
View Code? Open in Web Editor NEWSpringBoot2, SpringSecurity, JWT, Stateless Restful API
SpringBoot2, SpringSecurity, JWT, Stateless Restful API
안녕하세요. 개발자님 코드를 보면서 열심히 공부 중인 학생입니다.
의견: 컨트롤러 메소드들의 return 타입이 CommonResult, SingleResult, ListResult 입니다. 현재는 HTTP response status line에 200 혹은 500 상태 코드만 나오는 상황인데요. RESTful API에 맞게 status line의 상태코드도 직접 지정해주면 어떨까 생각합니다.
해결책 제시:
ex) 생성의 경우 CREATED를 이용하여 201 코드를 내려주면 더 명확하지 않을까 생각합니다. 다른 것들도 마찬가지구요.
ResponseEntity
return new ResponseEntity<>(responseService.getCustomException(), HttpStatus.CREATED);
만약에 이 방법이 괜찮다면 return 타입을 ResponseEntity로 변경 후 pull request 하겠습니다.
아직 공부하는 학생입장이라 부족하지만, 가볍게 읽어주시면 감사하겠습니다!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.