mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:25:49 +00:00
의존성 주입
This commit is contained in:
parent
345fe33c6c
commit
a5a1dea50f
1 changed files with 5 additions and 1 deletions
|
@ -38,9 +38,13 @@ class OwnerController {
|
||||||
|
|
||||||
private static final String VIEWS_OWNER_CREATE_OR_UPDATE_FORM = "owners/createOrUpdateOwnerForm";
|
private static final String VIEWS_OWNER_CREATE_OR_UPDATE_FORM = "owners/createOrUpdateOwnerForm";
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private OwnerRepository owners;
|
private OwnerRepository owners;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setOwners(OwnerRepository owners) {
|
||||||
|
this.owners = owners;
|
||||||
|
}
|
||||||
|
|
||||||
@InitBinder
|
@InitBinder
|
||||||
public void setAllowedFields(WebDataBinder dataBinder) {
|
public void setAllowedFields(WebDataBinder dataBinder) {
|
||||||
dataBinder.setDisallowedFields("id");
|
dataBinder.setDisallowedFields("id");
|
||||||
|
|
Loading…
Reference in a new issue