mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-26 04:12:47 +00:00
#96 Reformat code with EditorConfig
This commit is contained in:
parent
1aef94d6a8
commit
09ed33a5fc
56 changed files with 831 additions and 832 deletions
9
.editorconfig
Normal file
9
.editorconfig
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*.{java,xml}]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
5
pom.xml
5
pom.xml
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.springframework.samples</groupId>
|
<groupId>org.springframework.samples</groupId>
|
||||||
<artifactId>spring-petclinic</artifactId>
|
<artifactId>spring-petclinic</artifactId>
|
||||||
|
@ -294,7 +295,7 @@
|
||||||
<version>3.0</version>
|
<version>3.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArguments>
|
<compilerArguments>
|
||||||
<Xlint />
|
<Xlint/>
|
||||||
</compilerArguments>
|
</compilerArguments>
|
||||||
<verbose>true</verbose>
|
<verbose>true</verbose>
|
||||||
<source>${java.version}</source>
|
<source>${java.version}</source>
|
||||||
|
|
|
@ -32,15 +32,14 @@ public class BaseEntity {
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
protected Integer id;
|
protected Integer id;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
public void setId(Integer id) {
|
public void setId(Integer id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isNew() {
|
public boolean isNew() {
|
||||||
return (this.id == null);
|
return (this.id == null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,15 +32,14 @@ public class NamedEntity extends BaseEntity {
|
||||||
@Column(name = "name")
|
@Column(name = "name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return this.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.getName();
|
return this.getName();
|
||||||
|
|
|
@ -85,10 +85,6 @@ public class Owner extends Person {
|
||||||
this.telephone = telephone;
|
this.telephone = telephone;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setPetsInternal(Set<Pet> pets) {
|
|
||||||
this.pets = pets;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Set<Pet> getPetsInternal() {
|
protected Set<Pet> getPetsInternal() {
|
||||||
if (this.pets == null) {
|
if (this.pets == null) {
|
||||||
this.pets = new HashSet<>();
|
this.pets = new HashSet<>();
|
||||||
|
@ -96,6 +92,10 @@ public class Owner extends Person {
|
||||||
return this.pets;
|
return this.pets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void setPetsInternal(Set<Pet> pets) {
|
||||||
|
this.pets = pets;
|
||||||
|
}
|
||||||
|
|
||||||
public List<Pet> getPets() {
|
public List<Pet> getPets() {
|
||||||
List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
|
List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
|
||||||
PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
|
PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
|
||||||
|
|
|
@ -63,33 +63,28 @@ public class Pet extends NamedEntity {
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "pet", fetch = FetchType.EAGER)
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "pet", fetch = FetchType.EAGER)
|
||||||
private Set<Visit> visits;
|
private Set<Visit> visits;
|
||||||
|
|
||||||
|
|
||||||
public void setBirthDate(DateTime birthDate) {
|
|
||||||
this.birthDate = birthDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DateTime getBirthDate() {
|
public DateTime getBirthDate() {
|
||||||
return this.birthDate;
|
return this.birthDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setType(PetType type) {
|
public void setBirthDate(DateTime birthDate) {
|
||||||
this.type = type;
|
this.birthDate = birthDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PetType getType() {
|
public PetType getType() {
|
||||||
return this.type;
|
return this.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setOwner(Owner owner) {
|
public void setType(PetType type) {
|
||||||
this.owner = owner;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Owner getOwner() {
|
public Owner getOwner() {
|
||||||
return this.owner;
|
return this.owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setVisitsInternal(Set<Visit> visits) {
|
protected void setOwner(Owner owner) {
|
||||||
this.visits = visits;
|
this.owner = owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Set<Visit> getVisitsInternal() {
|
protected Set<Visit> getVisitsInternal() {
|
||||||
|
@ -99,6 +94,10 @@ public class Pet extends NamedEntity {
|
||||||
return this.visits;
|
return this.visits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void setVisitsInternal(Set<Visit> visits) {
|
||||||
|
this.visits = visits;
|
||||||
|
}
|
||||||
|
|
||||||
public List<Visit> getVisits() {
|
public List<Visit> getVisits() {
|
||||||
List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
|
List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
|
||||||
PropertyComparator.sort(sortedVisits, new MutableSortDefinition("date", false, false));
|
PropertyComparator.sort(sortedVisits, new MutableSortDefinition("date", false, false));
|
||||||
|
|
|
@ -49,11 +49,6 @@ public class Vet extends Person {
|
||||||
inverseJoinColumns = @JoinColumn(name = "specialty_id"))
|
inverseJoinColumns = @JoinColumn(name = "specialty_id"))
|
||||||
private Set<Specialty> specialties;
|
private Set<Specialty> specialties;
|
||||||
|
|
||||||
|
|
||||||
protected void setSpecialtiesInternal(Set<Specialty> specialties) {
|
|
||||||
this.specialties = specialties;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Set<Specialty> getSpecialtiesInternal() {
|
protected Set<Specialty> getSpecialtiesInternal() {
|
||||||
if (this.specialties == null) {
|
if (this.specialties == null) {
|
||||||
this.specialties = new HashSet<>();
|
this.specialties = new HashSet<>();
|
||||||
|
@ -61,6 +56,10 @@ public class Vet extends Person {
|
||||||
return this.specialties;
|
return this.specialties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void setSpecialtiesInternal(Set<Specialty> specialties) {
|
||||||
|
this.specialties = specialties;
|
||||||
|
}
|
||||||
|
|
||||||
@XmlElement
|
@XmlElement
|
||||||
public List<Specialty> getSpecialties() {
|
public List<Specialty> getSpecialties() {
|
||||||
List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
|
List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* The classes in this package represent PetClinic's business layer.
|
* The classes in this package represent PetClinic's business layer.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package org.springframework.samples.petclinic.model;
|
package org.springframework.samples.petclinic.model;
|
||||||
|
|
||||||
|
|
|
@ -62,8 +62,7 @@ public interface OwnerRepository {
|
||||||
*
|
*
|
||||||
* @param id the id to search for
|
* @param id the id to search for
|
||||||
* @return the <code>Owner</code> if found
|
* @return the <code>Owner</code> if found
|
||||||
* @throws org.springframework.dao.DataRetrievalFailureException
|
* @throws org.springframework.dao.DataRetrievalFailureException if not found
|
||||||
* if not found
|
|
||||||
*/
|
*/
|
||||||
Owner findById(int id) throws DataAccessException;
|
Owner findById(int id) throws DataAccessException;
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,7 @@ public interface PetRepository {
|
||||||
*
|
*
|
||||||
* @param id the id to search for
|
* @param id the id to search for
|
||||||
* @return the <code>Pet</code> if found
|
* @return the <code>Pet</code> if found
|
||||||
* @throws org.springframework.dao.DataRetrievalFailureException
|
* @throws org.springframework.dao.DataRetrievalFailureException if not found
|
||||||
* if not found
|
|
||||||
*/
|
*/
|
||||||
Pet findById(int id) throws DataAccessException;
|
Pet findById(int id) throws DataAccessException;
|
||||||
|
|
||||||
|
|
|
@ -29,21 +29,20 @@ class JdbcPet extends Pet {
|
||||||
|
|
||||||
private int ownerId;
|
private int ownerId;
|
||||||
|
|
||||||
|
|
||||||
public void setTypeId(int typeId) {
|
|
||||||
this.typeId = typeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getTypeId() {
|
public int getTypeId() {
|
||||||
return this.typeId;
|
return this.typeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOwnerId(int ownerId) {
|
public void setTypeId(int typeId) {
|
||||||
this.ownerId = ownerId;
|
this.typeId = typeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getOwnerId() {
|
public int getOwnerId() {
|
||||||
return this.ownerId;
|
return this.ownerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOwnerId(int ownerId) {
|
||||||
|
this.ownerId = ownerId;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* The classes in this package represent the JDBC implementation
|
* The classes in this package represent the JDBC implementation
|
||||||
* of PetClinic's persistence layer.
|
* of PetClinic's persistence layer.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package org.springframework.samples.petclinic.repository.jdbc;
|
package org.springframework.samples.petclinic.repository.jdbc;
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,7 @@ public class JpaOwnerRepositoryImpl implements OwnerRepository {
|
||||||
public void save(Owner owner) {
|
public void save(Owner owner) {
|
||||||
if (owner.getId() == null) {
|
if (owner.getId() == null) {
|
||||||
this.em.persist(owner);
|
this.em.persist(owner);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.em.merge(owner);
|
this.em.merge(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,7 @@ public class JpaPetRepositoryImpl implements PetRepository {
|
||||||
public void save(Pet pet) {
|
public void save(Pet pet) {
|
||||||
if (pet.getId() == null) {
|
if (pet.getId() == null) {
|
||||||
this.em.persist(pet);
|
this.em.persist(pet);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.em.merge(pet);
|
this.em.merge(pet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,7 @@ public class JpaVisitRepositoryImpl implements VisitRepository {
|
||||||
public void save(Visit visit) {
|
public void save(Visit visit) {
|
||||||
if (visit.getId() == null) {
|
if (visit.getId() == null) {
|
||||||
this.em.persist(visit);
|
this.em.persist(visit);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.em.merge(visit);
|
this.em.merge(visit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* The classes in this package represent the JPA implementation
|
* The classes in this package represent the JPA implementation
|
||||||
* of PetClinic's persistence layer.
|
* of PetClinic's persistence layer.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package org.springframework.samples.petclinic.repository.jpa;
|
package org.springframework.samples.petclinic.repository.jpa;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.springframework.util.StopWatch;
|
||||||
/**
|
/**
|
||||||
* Simple aspect that monitors call count and call invocation time. It uses JMX annotations and therefore can be
|
* Simple aspect that monitors call count and call invocation time. It uses JMX annotations and therefore can be
|
||||||
* monitored using any JMX console such as the jConsole
|
* monitored using any JMX console such as the jConsole
|
||||||
*
|
* <p/>
|
||||||
* This is only useful if you use JPA or JDBC. Spring-data-jpa doesn't have any correctly annotated classes to join on
|
* This is only useful if you use JPA or JDBC. Spring-data-jpa doesn't have any correctly annotated classes to join on
|
||||||
*
|
*
|
||||||
* @author Rob Harrop
|
* @author Rob Harrop
|
||||||
|
@ -44,17 +44,16 @@ public class CallMonitoringAspect {
|
||||||
|
|
||||||
private long accumulatedCallTime = 0;
|
private long accumulatedCallTime = 0;
|
||||||
|
|
||||||
|
@ManagedAttribute
|
||||||
|
public boolean isEnabled() {
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
@ManagedAttribute
|
@ManagedAttribute
|
||||||
public void setEnabled(boolean enabled) {
|
public void setEnabled(boolean enabled) {
|
||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManagedAttribute
|
|
||||||
public boolean isEnabled() {
|
|
||||||
return enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ManagedOperation
|
@ManagedOperation
|
||||||
public void reset() {
|
public void reset() {
|
||||||
this.callCount = 0;
|
this.callCount = 0;
|
||||||
|
|
|
@ -39,8 +39,7 @@ public abstract class EntityUtils {
|
||||||
* @param entityClass the entity class to look up
|
* @param entityClass the entity class to look up
|
||||||
* @param entityId the entity id to look up
|
* @param entityId the entity id to look up
|
||||||
* @return the found entity
|
* @return the found entity
|
||||||
* @throws ObjectRetrievalFailureException
|
* @throws ObjectRetrievalFailureException if the entity was not found
|
||||||
* if the entity was not found
|
|
||||||
*/
|
*/
|
||||||
public static <T extends BaseEntity> T getById(Collection<T> entities, Class<T> entityClass, int entityId)
|
public static <T extends BaseEntity> T getById(Collection<T> entities, Class<T> entityClass, int entityId)
|
||||||
throws ObjectRetrievalFailureException {
|
throws ObjectRetrievalFailureException {
|
||||||
|
|
|
@ -96,13 +96,11 @@ public class OwnerController {
|
||||||
// no owners found
|
// no owners found
|
||||||
result.rejectValue("lastName", "notFound", "not found");
|
result.rejectValue("lastName", "notFound", "not found");
|
||||||
return "owners/findOwners";
|
return "owners/findOwners";
|
||||||
}
|
} else if (results.size() == 1) {
|
||||||
else if (results.size() == 1) {
|
|
||||||
// 1 owner found
|
// 1 owner found
|
||||||
owner = results.iterator().next();
|
owner = results.iterator().next();
|
||||||
return "redirect:/owners/" + owner.getId();
|
return "redirect:/owners/" + owner.getId();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// multiple owners found
|
// multiple owners found
|
||||||
model.put("selections", results);
|
model.put("selections", results);
|
||||||
return "owners/ownersList";
|
return "owners/ownersList";
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class PetValidator implements Validator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// birth date validation
|
// birth date validation
|
||||||
if (pet.getBirthDate()==null) {
|
if (pet.getBirthDate() == null) {
|
||||||
errors.rejectValue("birthDate", "required", "required");
|
errors.rejectValue("birthDate", "required", "required");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class VetController {
|
||||||
this.clinicService = clinicService;
|
this.clinicService = clinicService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value={"/vets.xml","/vets.html"})
|
@RequestMapping(value = {"/vets.xml", "/vets.html"})
|
||||||
public String showVetList(Map<String, Object> model) {
|
public String showVetList(Map<String, Object> model) {
|
||||||
// Here we are returning an object of type 'Vets' rather than a collection of Vet objects
|
// Here we are returning an object of type 'Vets' rather than a collection of Vet objects
|
||||||
// so it is simpler for Object-Xml mapping
|
// so it is simpler for Object-Xml mapping
|
||||||
|
@ -52,7 +52,9 @@ public class VetController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/vets.json")
|
@RequestMapping("/vets.json")
|
||||||
public @ResponseBody Vets showResourcesVetList() {
|
public
|
||||||
|
@ResponseBody
|
||||||
|
Vets showResourcesVetList() {
|
||||||
// Here we are returning an object of type 'Vets' rather than a collection of Vet objects
|
// Here we are returning an object of type 'Vets' rather than a collection of Vet objects
|
||||||
// so it is simpler for JSon/Object mapping
|
// so it is simpler for JSon/Object mapping
|
||||||
Vets vets = new Vets();
|
Vets vets = new Vets();
|
||||||
|
|
|
@ -60,6 +60,7 @@ public class VisitController {
|
||||||
* - Make sure we always have fresh data
|
* - Make sure we always have fresh data
|
||||||
* - Since we do not use the session scope, make sure that Pet object always has an id
|
* - Since we do not use the session scope, make sure that Pet object always has an id
|
||||||
* (Even though id is not part of the form fields)
|
* (Even though id is not part of the form fields)
|
||||||
|
*
|
||||||
* @param petId
|
* @param petId
|
||||||
* @return Pet
|
* @return Pet
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* The classes in this package represent PetClinic's web presentation layer.
|
* The classes in this package represent PetClinic's web presentation layer.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package org.springframework.samples.petclinic.web;
|
package org.springframework.samples.petclinic.web;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
img.speakerPic {
|
img.speakerPic {
|
||||||
float: right;
|
float: right;
|
||||||
padding:10;
|
padding: 10;
|
||||||
width: 90;
|
width: 90;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -18,22 +18,36 @@
|
||||||
|
|
||||||
<h1>Speakers</h1>
|
<h1>Speakers</h1>
|
||||||
<table class="speakersTable">
|
<table class="speakersTable">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<img class="speakerPic" alt="Sergiu Bodiu" src="http://m.c.lnkd.licdn.com/mpr/mpr/shrink_200_200/p/4/000/16a/2ba/0ba653e.jpg" />
|
<img class="speakerPic" alt="Sergiu Bodiu"
|
||||||
|
src="http://m.c.lnkd.licdn.com/mpr/mpr/shrink_200_200/p/4/000/16a/2ba/0ba653e.jpg"/>
|
||||||
|
|
||||||
<h2>Sergiu Bodiu </h2>
|
<h2>Sergiu Bodiu </h2>
|
||||||
|
|
||||||
<h3> Java Consultant at Bank of America </h3>
|
<h3> Java Consultant at Bank of America </h3>
|
||||||
<font size="5">S</font>easoned consultant experienced in large-scale e-commerce projects, passionate about providing innovative technology solutions to solve complex business problems, have extensive knowledge and experience delivering enterprise wide applications. He is skilled in software design, data modeling, stakeholder management, IT strategic planning, technical know-how and security. Able to design, implement, test and maintain software product components with strong focus on design elegance and software reuse.
|
<font size="5">S</font>easoned consultant experienced in large-scale e-commerce projects, passionate about
|
||||||
|
providing innovative technology solutions to solve complex business problems, have extensive knowledge and
|
||||||
|
experience delivering enterprise wide applications. He is skilled in software design, data modeling,
|
||||||
|
stakeholder management, IT strategic planning, technical know-how and security. Able to design, implement,
|
||||||
|
test and maintain software product components with strong focus on design elegance and software reuse.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<img alt="Sergiu Bodiu" src="http://m.c.lnkd.licdn.com/mpr/mpr/shrink_200_200/p/4/000/16a/2ba/0ba653e.jpg" width="84" height="84" align="right" hspace="10"/>
|
<img alt="Sergiu Bodiu" src="http://m.c.lnkd.licdn.com/mpr/mpr/shrink_200_200/p/4/000/16a/2ba/0ba653e.jpg"
|
||||||
|
width="84" height="84" align="right" hspace="10"/>
|
||||||
|
|
||||||
<h2>Sergiu Bodiu </h2>
|
<h2>Sergiu Bodiu </h2>
|
||||||
|
|
||||||
<h3> Java Consultant at Bank of America </h3>
|
<h3> Java Consultant at Bank of America </h3>
|
||||||
<font size="5">S</font>easoned consultant experienced in large-scale e-commerce projects, passionate about providing innovative technology solutions to solve complex business problems, have extensive knowledge and experience delivering enterprise wide applications. He is skilled in software design, data modeling, stakeholder management, IT strategic planning, technical know-how and security. Able to design, implement, test and maintain software product components with strong focus on design elegance and software reuse.
|
<font size="5">S</font>easoned consultant experienced in large-scale e-commerce projects, passionate about
|
||||||
|
providing innovative technology solutions to solve complex business problems, have extensive knowledge and
|
||||||
|
experience delivering enterprise wide applications. He is skilled in software design, data modeling,
|
||||||
|
stakeholder management, IT strategic planning, technical know-how and security. Able to design, implement,
|
||||||
|
test and maintain software product components with strong focus on design elegance and software reuse.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<!--
|
<!--
|
||||||
Repository and Service layers
|
Repository and Service layers
|
||||||
-->
|
-->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
|
||||||
xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
|
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
|
||||||
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jpa="http://www.springframework.org/schema/data/jpa"
|
xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns="http://www.springframework.org/schema/beans"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
|
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<context:property-placeholder location="classpath:spring/data-access.properties" system-properties-mode="OVERRIDE"/>
|
<context:property-placeholder location="classpath:spring/data-access.properties" system-properties-mode="OVERRIDE"/>
|
||||||
|
|
||||||
<!-- enables scanning for @Transactional annotations -->
|
<!-- enables scanning for @Transactional annotations -->
|
||||||
<tx:annotation-driven />
|
<tx:annotation-driven/>
|
||||||
|
|
||||||
|
|
||||||
<!-- ================== 3 Profiles to choose from ===================
|
<!-- ================== 3 Profiles to choose from ===================
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
<!--
|
<!--
|
||||||
Application context definition for PetClinic Datasource.
|
Application context definition for PetClinic Datasource.
|
||||||
-->
|
-->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
|
||||||
xmlns:p="http://www.springframework.org/schema/p"
|
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
|
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
|
||||||
xmlns:jee="http://www.springframework.org/schema/jee"
|
xmlns:jee="http://www.springframework.org/schema/jee"
|
||||||
|
xmlns="http://www.springframework.org/schema/beans"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/context
|
http://www.springframework.org/schema/context
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
<jdbc:script location="${jdbc.dataLocation}"/>
|
<jdbc:script location="${jdbc.dataLocation}"/>
|
||||||
</jdbc:initialize-database>
|
</jdbc:initialize-database>
|
||||||
|
|
||||||
<beans profile="javaee" >
|
<beans profile="javaee">
|
||||||
<!-- JNDI DataSource for JEE environments -->
|
<!-- JNDI DataSource for JEE environments -->
|
||||||
<jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/petclinic"/>
|
<jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/petclinic"/>
|
||||||
</beans>
|
</beans>
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
<!--
|
<!--
|
||||||
- DispatcherServlet application context for PetClinic's web tier.
|
- DispatcherServlet application context for PetClinic's web tier.
|
||||||
-->
|
-->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xmlns:p="http://www.springframework.org/schema/p"
|
xmlns:p="http://www.springframework.org/schema/p"
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||||
|
xmlns="http://www.springframework.org/schema/beans"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/mvc
|
xsi:schemaLocation="http://www.springframework.org/schema/mvc
|
||||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/beans
|
http://www.springframework.org/schema/beans
|
||||||
|
@ -31,11 +31,11 @@
|
||||||
<!-- uses WebJars so Javascript and CSS libs can be declared as Maven dependencies (Bootstrap, jQuery...) -->
|
<!-- uses WebJars so Javascript and CSS libs can be declared as Maven dependencies (Bootstrap, jQuery...) -->
|
||||||
<mvc:resources mapping="/webjars/**" location="classpath:/META-INF/resources/webjars/"/>
|
<mvc:resources mapping="/webjars/**" location="classpath:/META-INF/resources/webjars/"/>
|
||||||
|
|
||||||
<mvc:view-controller path="/" view-name="welcome" />
|
<mvc:view-controller path="/" view-name="welcome"/>
|
||||||
|
|
||||||
<!-- serve static resources (*.html, ...) from src/main/webapp/
|
<!-- serve static resources (*.html, ...) from src/main/webapp/
|
||||||
Required when both servlet-mapping is '/' and static resources need to be served -->
|
Required when both servlet-mapping is '/' and static resources need to be served -->
|
||||||
<mvc:default-servlet-handler />
|
<mvc:default-servlet-handler/>
|
||||||
|
|
||||||
<bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean">
|
<bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean">
|
||||||
<property name="formatters">
|
<property name="formatters">
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<!--
|
<!--
|
||||||
- DispatcherServlet application context for PetClinic's web tier.
|
- DispatcherServlet application context for PetClinic's web tier.
|
||||||
-->
|
-->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oxm="http://www.springframework.org/schema/oxm"
|
||||||
xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:mvc="http://www.springframework.org/schema/mvc"
|
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns="http://www.springframework.org/schema/beans"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||||
|
@ -17,13 +17,13 @@
|
||||||
<mvc:content-negotiation use-not-acceptable="true">
|
<mvc:content-negotiation use-not-acceptable="true">
|
||||||
<mvc:default-views>
|
<mvc:default-views>
|
||||||
<bean class="org.springframework.web.servlet.view.JstlView">
|
<bean class="org.springframework.web.servlet.view.JstlView">
|
||||||
<property name="url" value="" />
|
<property name="url" value=""/>
|
||||||
</bean>
|
</bean>
|
||||||
</mvc:default-views>
|
</mvc:default-views>
|
||||||
</mvc:content-negotiation>
|
</mvc:content-negotiation>
|
||||||
|
|
||||||
<!-- Registering BeanNameViewResolver and InternalViewResolver -->
|
<!-- Registering BeanNameViewResolver and InternalViewResolver -->
|
||||||
<mvc:bean-name />
|
<mvc:bean-name/>
|
||||||
<mvc:jsp prefix="/WEB-INF/jsp/" suffix=".jsp"/>
|
<mvc:jsp prefix="/WEB-INF/jsp/" suffix=".jsp"/>
|
||||||
</mvc:view-resolvers>
|
</mvc:view-resolvers>
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
<!--
|
<!--
|
||||||
Application context definition for PetClinic on JPA.
|
Application context definition for PetClinic on JPA.
|
||||||
-->
|
-->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
xmlns:cache="http://www.springframework.org/schema/cache"
|
xmlns:cache="http://www.springframework.org/schema/cache"
|
||||||
|
xmlns="http://www.springframework.org/schema/beans"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/aop
|
xsi:schemaLocation="http://www.springframework.org/schema/aop
|
||||||
http://www.springframework.org/schema/aop/spring-aop.xsd
|
http://www.springframework.org/schema/aop/spring-aop.xsd
|
||||||
http://www.springframework.org/schema/beans
|
http://www.springframework.org/schema/beans
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<c:out value="${pet.name}"/>
|
<c:out value="${pet.name}"/>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</datatables:column>
|
</datatables:column>
|
||||||
<datatables:export type="pdf" cssClass="btn" cssStyle="height: 25px;" />
|
<datatables:export type="pdf" cssClass="btn" cssStyle="height: 25px;"/>
|
||||||
</datatables:table>
|
</datatables:table>
|
||||||
|
|
||||||
<jsp:include page="../fragments/footer.jsp"/>
|
<jsp:include page="../fragments/footer.jsp"/>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$("#birthDate").datepicker({ dateFormat: 'yy/mm/dd'});
|
$("#birthDate").datepicker({dateFormat: 'yy/mm/dd'});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$("#date").datepicker({ dateFormat: 'yy/mm/dd'});
|
$("#date").datepicker({dateFormat: 'yy/mm/dd'});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -43,8 +43,8 @@
|
||||||
|
|
||||||
<form:form modelAttribute="visit">
|
<form:form modelAttribute="visit">
|
||||||
|
|
||||||
<petclinic:inputField label="date" name="date" />
|
<petclinic:inputField label="date" name="date"/>
|
||||||
<petclinic:inputField label="description" name="description" />
|
<petclinic:inputField label="description" name="description"/>
|
||||||
|
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<input type="hidden" name="petId" value="${visit.pet.id}"/>
|
<input type="hidden" name="petId" value="${visit.pet.id}"/>
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
|
|
||||||
<h2>Veterinarians</h2>
|
<h2>Veterinarians</h2>
|
||||||
|
|
||||||
<datatables:table id="vets" data="${vets.vetList}" row="vet" theme="bootstrap2" cssClass="table table-striped" pageable="false" info="false">
|
<datatables:table id="vets" data="${vets.vetList}" row="vet" theme="bootstrap2" cssClass="table table-striped"
|
||||||
|
pageable="false" info="false">
|
||||||
<datatables:column title="Name">
|
<datatables:column title="Name">
|
||||||
<c:out value="${vet.firstName} ${vet.lastName}"></c:out>
|
<c:out value="${vet.firstName} ${vet.lastName}"></c:out>
|
||||||
</datatables:column>
|
</datatables:column>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||||
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||||
version="3.0" metadata-complete="true">
|
version="3.0" metadata-complete="true">
|
||||||
|
|
|
@ -13,11 +13,9 @@ import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
|
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Michael Isvy
|
* @author Michael Isvy
|
||||||
* Simple test to make sure that Bean Validation is working
|
* Simple test to make sure that Bean Validation is working
|
||||||
* (useful when upgrading to a new version of Hibernate Validator/ Bean Validation)
|
* (useful when upgrading to a new version of Hibernate Validator/ Bean Validation)
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class ValidatorTests {
|
public class ValidatorTests {
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p> Integration test using the jdbc profile.
|
* <p> Integration test using the jdbc profile.
|
||||||
* @see AbstractClinicServiceTests AbstractClinicServiceTests for more details. </p>
|
|
||||||
*
|
*
|
||||||
* @author Thomas Risberg
|
* @author Thomas Risberg
|
||||||
* @author Michael Isvy
|
* @author Michael Isvy
|
||||||
|
* @see AbstractClinicServiceTests AbstractClinicServiceTests for more details. </p>
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration(locations = {"classpath:spring/business-config.xml"})
|
@ContextConfiguration(locations = {"classpath:spring/business-config.xml"})
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package org.springframework.samples.petclinic.service;
|
package org.springframework.samples.petclinic.service;
|
||||||
|
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
@ -8,11 +7,11 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p> Integration test using the jpa profile.
|
* <p> Integration test using the jpa profile.
|
||||||
* @see AbstractClinicServiceTests AbstractClinicServiceTests for more details. </p>
|
|
||||||
*
|
*
|
||||||
* @author Rod Johnson
|
* @author Rod Johnson
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @author Michael Isvy
|
* @author Michael Isvy
|
||||||
|
* @see AbstractClinicServiceTests AbstractClinicServiceTests for more details. </p>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ContextConfiguration(locations = {"classpath:spring/business-config.xml"})
|
@ContextConfiguration(locations = {"classpath:spring/business-config.xml"})
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package org.springframework.samples.petclinic.service;
|
package org.springframework.samples.petclinic.service;
|
||||||
|
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
@ -8,8 +7,9 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p> Integration test using the 'Spring Data' profile.
|
* <p> Integration test using the 'Spring Data' profile.
|
||||||
* @see AbstractClinicServiceTests AbstractClinicServiceTests for more details. </p>
|
*
|
||||||
* @author Michael Isvy
|
* @author Michael Isvy
|
||||||
|
* @see AbstractClinicServiceTests AbstractClinicServiceTests for more details. </p>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ContextConfiguration(locations = {"classpath:spring/business-config.xml"})
|
@ContextConfiguration(locations = {"classpath:spring/business-config.xml"})
|
||||||
|
|
Loading…
Reference in a new issue