File tree Expand file tree Collapse file tree 7 files changed +13
-14
lines changed
nrich-form-configuration/src/main/java/net/croz/nrich/formconfiguration/controller
nrich-registry/src/main/java/net/croz/nrich/registry
nrich-security-csrf/src/main/java/net/croz/nrich/security/csrf/core/controller Expand file tree Collapse file tree 7 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ endpoints (one for retrieving and one for updating account data) that looks like
76
76
``` java
77
77
78
78
@RequiredArgsConstructor
79
- @RestController
80
79
@RequestMapping (" account" )
80
+ @RestController
81
81
public class AccountController {
82
82
83
83
private final AccountService accountService;
Original file line number Diff line number Diff line change 24
24
import org .springframework .web .bind .annotation .PostMapping ;
25
25
import org .springframework .web .bind .annotation .RequestBody ;
26
26
import org .springframework .web .bind .annotation .RequestMapping ;
27
- import org .springframework .web .bind .annotation .ResponseBody ;
27
+ import org .springframework .web .bind .annotation .RestController ;
28
28
29
29
import jakarta .validation .Valid ;
30
30
import java .util .List ;
31
31
32
32
@ RequiredArgsConstructor
33
33
@ RequestMapping ("${nrich.form-configuration.endpoint-path:nrich/form/configuration}" )
34
+ @ RestController
34
35
public class FormConfigurationController {
35
36
36
37
private final FormConfigurationService formConfigurationService ;
37
38
38
- @ ResponseBody
39
39
@ PostMapping ("fetch-all" )
40
40
public List <FormConfiguration > fetchAll () {
41
41
return formConfigurationService .fetchFormConfigurationList ();
42
42
}
43
43
44
- @ ResponseBody
45
44
@ PostMapping ("fetch" )
46
45
public List <FormConfiguration > fetch (@ RequestBody @ Valid FetchFormConfigurationRequest request ) {
47
46
return formConfigurationService .fetchFormConfigurationList (request .getFormIdList ());
Original file line number Diff line number Diff line change @@ -325,8 +325,8 @@ Example of manual providing:
325
325
326
326
``` java
327
327
@RequiredArgsConstructor
328
- @RestController
329
328
@RequestMapping (" notification-example" )
329
+ @RestController
330
330
public class ExampleController {
331
331
332
332
private final NotificationResponseService notificationResponseService;
@@ -369,8 +369,8 @@ Example of automatic resolving:
369
369
370
370
``` java
371
371
@RequiredArgsConstructor
372
- @RestController
373
372
@RequestMapping (" notification-example" )
373
+ @RestController
374
374
public class ExampleController {
375
375
376
376
private final NotificationResponseService notificationResponseService;
Original file line number Diff line number Diff line change 22
22
import net .croz .nrich .registry .api .configuration .service .RegistryConfigurationService ;
23
23
import org .springframework .web .bind .annotation .PostMapping ;
24
24
import org .springframework .web .bind .annotation .RequestMapping ;
25
- import org .springframework .web .bind .annotation .ResponseBody ;
25
+ import org .springframework .web .bind .annotation .RestController ;
26
26
27
27
import java .util .List ;
28
28
29
29
@ RequiredArgsConstructor
30
30
@ RequestMapping ("${nrich.registry.configuration.endpoint-path:nrich/registry/configuration}" )
31
- @ ResponseBody
31
+ @ RestController
32
32
public class RegistryConfigurationController {
33
33
34
34
private final RegistryConfigurationService registryConfigurationService ;
Original file line number Diff line number Diff line change 34
34
import org .springframework .web .bind .annotation .PostMapping ;
35
35
import org .springframework .web .bind .annotation .RequestBody ;
36
36
import org .springframework .web .bind .annotation .RequestMapping ;
37
- import org .springframework .web .bind .annotation .ResponseBody ;
37
+ import org .springframework .web .bind .annotation .RestController ;
38
38
39
39
import jakarta .validation .Valid ;
40
40
import java .util .Map ;
41
41
42
42
@ RequiredArgsConstructor
43
43
@ RequestMapping ("${nrich.registry.data.endpoint-path:nrich/registry/data}" )
44
- @ ResponseBody
44
+ @ RestController
45
45
public class RegistryDataController {
46
46
47
47
private final RegistryDataService registryDataService ;
Original file line number Diff line number Diff line change 25
25
import org .springframework .web .bind .annotation .PostMapping ;
26
26
import org .springframework .web .bind .annotation .RequestBody ;
27
27
import org .springframework .web .bind .annotation .RequestMapping ;
28
- import org .springframework .web .bind .annotation .ResponseBody ;
28
+ import org .springframework .web .bind .annotation .RestController ;
29
29
30
30
import jakarta .validation .Valid ;
31
31
32
32
@ RequiredArgsConstructor
33
33
@ RequestMapping ("${nrich.registry.history.endpoint-path:nrich/registry/history}" )
34
- @ ResponseBody
34
+ @ RestController
35
35
public class RegistryHistoryController {
36
36
37
37
private final RegistryHistoryService registryHistoryService ;
Original file line number Diff line number Diff line change 19
19
20
20
import net .croz .nrich .security .csrf .core .constants .CsrfConstants ;
21
21
import org .springframework .web .bind .annotation .RequestMapping ;
22
- import org .springframework .web .bind .annotation .ResponseBody ;
22
+ import org .springframework .web .bind .annotation .RestController ;
23
23
24
24
import java .util .HashMap ;
25
25
import java .util .Map ;
28
28
* Used by client for csrf ping url
29
29
*/
30
30
@ RequestMapping
31
+ @ RestController
31
32
public class CsrfPingController {
32
33
33
34
private static final String SUCCESS_KEY = "success" ;
34
35
35
36
@ RequestMapping ("${nrich.security.csrf.endpoint-path:" + CsrfConstants .CSRF_DEFAULT_PING_URI + "}" )
36
- @ ResponseBody
37
37
public Map <String , Boolean > ping () {
38
38
Map <String , Boolean > result = new HashMap <>();
39
39
You can’t perform that action at this time.
0 commit comments