Somebody knows an standard naming to the Spring beans in a App Context?
I used the camel case naming, but I'm not sure if exists an kind of standard, I searched in the net about that but I haven't found something.
Bean Naming Conventions (Spring Framework Reference section 1.3.1)
The convention is to use the standard Java convention for instance field names when naming beans. That is, bean names start with a lowercase letter, and are camel-cased from then on. Examples of such names would be (without quotes) 'accountManager', 'accountService', 'userDao', 'loginController', and so forth.
Naming beans consistently makes your configuration easier to read and understand, and if you are using Spring AOP it helps a lot when applying advice to a set of beans related by name.
camelCase seems right! For bean Id's, the naming convention would be same as Java class field name. The bean ID for an instance of ServiceDAO would be serviceDAO. The package name can be prefixed to the bean ID for larger projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With