mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-05-21 11:29:38 +00:00
renaming controllers so they all have 'Controller' suffix
This commit is contained in:
parent
c690c9d05c
commit
aeeeace8a2
8 changed files with 22 additions and 18 deletions
|
@ -27,13 +27,13 @@ import org.springframework.web.bind.support.SessionStatus;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/owners/new")
|
@RequestMapping("/owners/new")
|
||||||
@SessionAttributes(types = Owner.class)
|
@SessionAttributes(types = Owner.class)
|
||||||
public class AddOwnerForm {
|
public class AddOwnerController {
|
||||||
|
|
||||||
private final Clinic clinic;
|
private final Clinic clinic;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public AddOwnerForm(Clinic clinic) {
|
public AddOwnerController(Clinic clinic) {
|
||||||
this.clinic = clinic;
|
this.clinic = clinic;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,13 +32,13 @@ import org.springframework.web.bind.support.SessionStatus;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/owners/{ownerId}/pets/new")
|
@RequestMapping("/owners/{ownerId}/pets/new")
|
||||||
@SessionAttributes("pet")
|
@SessionAttributes("pet")
|
||||||
public class AddPetForm {
|
public class AddPetController {
|
||||||
|
|
||||||
private final Clinic clinic;
|
private final Clinic clinic;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public AddPetForm(Clinic clinic) {
|
public AddPetController(Clinic clinic) {
|
||||||
this.clinic = clinic;
|
this.clinic = clinic;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,13 +29,13 @@ import org.springframework.web.bind.support.SessionStatus;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/owners/*/pets/{petId}/visits/new")
|
@RequestMapping("/owners/*/pets/{petId}/visits/new")
|
||||||
@SessionAttributes("visit")
|
@SessionAttributes("visit")
|
||||||
public class AddVisitForm {
|
public class AddVisitController {
|
||||||
|
|
||||||
private final Clinic clinic;
|
private final Clinic clinic;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public AddVisitForm(Clinic clinic) {
|
public AddVisitController(Clinic clinic) {
|
||||||
this.clinic = clinic;
|
this.clinic = clinic;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,13 +27,13 @@ import org.springframework.web.bind.support.SessionStatus;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/owners/{ownerId}/edit")
|
@RequestMapping("/owners/{ownerId}/edit")
|
||||||
@SessionAttributes(types = Owner.class)
|
@SessionAttributes(types = Owner.class)
|
||||||
public class EditOwnerForm {
|
public class EditOwnerController {
|
||||||
|
|
||||||
private final Clinic clinic;
|
private final Clinic clinic;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public EditOwnerForm(Clinic clinic) {
|
public EditOwnerController(Clinic clinic) {
|
||||||
this.clinic = clinic;
|
this.clinic = clinic;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,13 +30,13 @@ import org.springframework.web.bind.support.SessionStatus;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/owners/*/pets/{petId}/edit")
|
@RequestMapping("/owners/*/pets/{petId}/edit")
|
||||||
@SessionAttributes("pet")
|
@SessionAttributes("pet")
|
||||||
public class EditPetForm {
|
public class EditPetController {
|
||||||
|
|
||||||
private final Clinic clinic;
|
private final Clinic clinic;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public EditPetForm(Clinic clinic) {
|
public EditPetController(Clinic clinic) {
|
||||||
this.clinic = clinic;
|
this.clinic = clinic;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,13 +23,13 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
* @author Arjen Poutsma
|
* @author Arjen Poutsma
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class FindOwnersForm {
|
public class FindOwnersController {
|
||||||
|
|
||||||
private final Clinic clinic;
|
private final Clinic clinic;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public FindOwnersForm(Clinic clinic) {
|
public FindOwnersController(Clinic clinic) {
|
||||||
this.clinic = clinic;
|
this.clinic = clinic;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
<level value="DEBUG" />
|
<level value="DEBUG" />
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
|
<logger name="org.springframework.web">
|
||||||
|
<level value="DEBUG" />
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Root Logger -->
|
<!-- Root Logger -->
|
||||||
|
|
|
@ -819,32 +819,32 @@
|
||||||
that is used to handle simple display-oriented URLs.
|
that is used to handle simple display-oriented URLs.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.FindOwnersForm</span>
|
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.FindOwnersController</span>
|
||||||
is an annotation-driven, POJO <em>Form</em> controller that is used to search for
|
is an annotation-driven, POJO <em>Form</em> controller that is used to search for
|
||||||
<strong>Owner</strong>s by last name.
|
<strong>Owner</strong>s by last name.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.AddOwnerForm</span>
|
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.AddOwnerController</span>
|
||||||
is an annotation-driven, POJO <em>Form</em> controller that is used to add a new <strong>Owner</strong>
|
is an annotation-driven, POJO <em>Form</em> controller that is used to add a new <strong>Owner</strong>
|
||||||
to the system.
|
to the system.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.EditOwnerForm</span>
|
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.EditOwnerController</span>
|
||||||
is an annotation-driven, POJO <em>Form</em> controller that is used to edit an existing <strong>Owner</strong>.
|
is an annotation-driven, POJO <em>Form</em> controller that is used to edit an existing <strong>Owner</strong>.
|
||||||
A copy of the existing <strong>Owner</strong> is used for editing.
|
A copy of the existing <strong>Owner</strong> is used for editing.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.AddPetForm</span>
|
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.AddPetController</span>
|
||||||
is an annotation-driven, POJO <em>Form</em> controller that is used to add a new <strong>Pet</strong>
|
is an annotation-driven, POJO <em>Form</em> controller that is used to add a new <strong>Pet</strong>
|
||||||
to an existing <strong>Owner</strong>.
|
to an existing <strong>Owner</strong>.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.EditPetForm</span>
|
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.EditPetController</span>
|
||||||
is an annotation-driven, POJO <em>Form</em> controller that is used to edit an existing <strong>Pet</strong>.
|
is an annotation-driven, POJO <em>Form</em> controller that is used to edit an existing <strong>Pet</strong>.
|
||||||
A copy of the existing <strong>Pet</strong> is used for editing.
|
A copy of the existing <strong>Pet</strong> is used for editing.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.AddVisitForm</span>
|
<span style="font-weight: bold; font-style: italic;">org.springframework.samples.petclinic.web.AddVisitController</span>
|
||||||
is an annotation-driven, POJO <em>Form</em> controller that is used to add a new <strong>Visit</strong>
|
is an annotation-driven, POJO <em>Form</em> controller that is used to add a new <strong>Visit</strong>
|
||||||
to an existing <strong>Pet</strong>.
|
to an existing <strong>Pet</strong>.
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue