File tree Expand file tree Collapse file tree 5 files changed +9
-16
lines changed
src/main/java/com/github/throyer/common/springboot Expand file tree Collapse file tree 5 files changed +9
-16
lines changed Original file line number Diff line number Diff line change 11package com .github .throyer .common .springboot .controllers .app ;
22
3- import com .github .throyer .common .springboot .domain .models .shared .Toast ;
4- import com .github .throyer .common .springboot .domain .models .shared .Type ;
5- import com .github .throyer .common .springboot .domain .services .user .CreateUserService ;
3+ import javax .validation .Valid ;
64
5+ import com .github .throyer .common .springboot .domain .services .user .CreateUserService ;
76import com .github .throyer .common .springboot .domain .services .user .dto .CreateUserApp ;
8- import com .github .throyer .common .springboot .utils .Toasts ;
9- import java .util .List ;
10- import javax .validation .Valid ;
7+
118import org .springframework .beans .factory .annotation .Autowired ;
129import org .springframework .stereotype .Controller ;
1310import org .springframework .ui .Model ;
Original file line number Diff line number Diff line change 11package com .github .throyer .common .springboot .domain .models .pagination ;
22
3+ import static java .util .Objects .nonNull ;
4+ import static org .springframework .data .domain .PageRequest .of ;
5+ import static org .springframework .data .domain .Sort .by ;
6+
37import java .lang .reflect .Field ;
48import java .util .ArrayList ;
59import java .util .Arrays ;
610import java .util .List ;
7- import java .util .Objects ;
811import java .util .Optional ;
912import java .util .stream .Stream ;
1013
1316import com .github .throyer .common .springboot .domain .validation .InvalidSortException ;
1417import com .github .throyer .common .springboot .domain .validation .SimpleError ;
1518
16- import org .springframework .data .domain .PageRequest ;
1719import org .springframework .data .domain .Pageable ;
1820import org .springframework .data .domain .Sort ;
1921import org .springframework .data .domain .Sort .Order ;
2022import org .springframework .http .HttpStatus ;
2123import org .springframework .web .server .ResponseStatusException ;
2224
23- import static java .util .Objects .nonNull ;
24- import static org .springframework .data .domain .PageRequest .of ;
25- import static org .springframework .data .domain .Sort .by ;
26-
2725public class Pagination {
2826
2927 private static final int FIRST_PAGE = 0 ;
Original file line number Diff line number Diff line change 66import static java .util .Optional .empty ;
77import static java .util .Optional .of ;
88
9- import java .util .Objects ;
109import java .util .Optional ;
1110
1211import com .github .throyer .common .springboot .domain .models .security .Authorized ;
Original file line number Diff line number Diff line change 11package com .github .throyer .common .springboot .domain .services .user ;
22
3- import com .github .throyer .common .springboot .domain .models .shared .Toast ;
4- import com .github .throyer .common .springboot .domain .models .shared .Type ;
53import static com .github .throyer .common .springboot .utils .Responses .created ;
64
75import java .util .List ;
86
7+ import com .github .throyer .common .springboot .domain .models .shared .Type ;
98import com .github .throyer .common .springboot .domain .repositories .RoleRepository ;
109import com .github .throyer .common .springboot .domain .repositories .UserRepository ;
1110import com .github .throyer .common .springboot .domain .services .user .dto .CreateUserApi ;
Original file line number Diff line number Diff line change 11package com .github .throyer .common .springboot .middlewares ;
22
3- import static com .github .throyer .common .springboot .domain .services .security .SecurityService .authorize ;
43import static com .github .throyer .common .springboot .utils .TokenUtils .authorization ;
54import static java .util .Optional .ofNullable ;
65
1211import javax .servlet .http .HttpServletResponse ;
1312
1413import com .github .throyer .common .springboot .domain .services .security .SecurityService ;
14+
1515import org .springframework .stereotype .Component ;
1616import org .springframework .web .filter .OncePerRequestFilter ;
1717
You can’t perform that action at this time.
0 commit comments