Unable to find Spring Reference samples package (org.springframework.samples) [closed]

I’am going through the Spring Reference Doc and I see that many samples codes refer to artifacts from the package org.springframework.samples. I have been looking for them on Github without success.

Can someone help me ?

Answer

Spring is evolving over the years. The examples with jpetstore where PetStoreServiceImpl was used existed around 2007 – 2009, when Spring 2 – 2.5 was used. It is not maintained any more. The current version of examples is petclinic, see the links below. The project close to what you refer is spring-framework-petclinic.

The examples of code and configuration in the Spring documentation were not updated with the time. Even for Spring 5 they still use a lot of XML. Technically speaking XML configuration is fine. But in the last 5 years I haven’t see any new Spring project with XML configuration. All of them have used annotations.

Also you see in the documentation JpaAccountDao, JpaItemDao. It is also not wrong. But very often new Spring applications are based on Spring Boot, Spring Data, and instead of DAO concept the repository concept is used.

Nevertheless, all core concepts in the documentation are still valid and one should know them. For instance, the documentation about scopes uses old screenshots with DAOs. But the text is valid and up to date.

Leave a Reply

Your email address will not be published. Required fields are marked *