Added ConverterFactory test
This commit is contained in:
committed by
Victor Mosin
parent
89f9f8c6bf
commit
753b309c3c
@@ -1,6 +1,7 @@
|
||||
package org.baeldung.controller;
|
||||
|
||||
import org.baeldung.domain.GenericEntity;
|
||||
import org.baeldung.domain.Modes;
|
||||
import org.baeldung.web.resolver.Version;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -45,6 +46,11 @@ public class GenericEntityController {
|
||||
return entityList.stream().findFirst().get();
|
||||
}
|
||||
|
||||
@RequestMapping("/entity/findbymode/{mode}")
|
||||
public GenericEntity findByEnum(@PathVariable("mode") Modes mode) {
|
||||
return entityList.stream().findFirst().get();
|
||||
}
|
||||
|
||||
@RequestMapping("/entity/findbyversion")
|
||||
public ResponseEntity findByVersion(@Version String version) {
|
||||
return version != null
|
||||
|
||||
Reference in New Issue
Block a user