mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-18 05:25:50 +00:00
Fix PetValidator when using the JDBC profile
Steps to reproduce: Set the web.xml context-param spring.profiles.active to jdbc. Run app and navigate to Find owners > Find Owner > Betty Davis > Edit Pet. Notice the java.lang.IllegalStateException: Invalid target for Validator [org.springframework.samples.petclinic.web.PetValidator@213eb80d]: Basil
This commit is contained in:
parent
dda105599b
commit
22da88c948
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ public class PetValidator implements Validator {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean supports(Class<?> clazz) {
|
public boolean supports(Class<?> clazz) {
|
||||||
return Pet.class.equals(clazz);
|
return Pet.class.isAssignableFrom(clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue