上传者: tiny_ding
|
上传时间: 2019-12-21 18:55:15
|
文件大小: 7.24MB
|
文件类型: pdf
Convention over configuration is a simple concept. Systems, libraries, and frameworks
should assume reasonable defaults without requiring that unnecessary configuration
systems should “just work.” Popular frameworks such as Ruby on Rails and EJB3 have
started to adhere to these principles in reaction to the configuration complexity of
frameworks such as the initial Enterprise JavaBeans™ (EJB) specifications. An illustration
of convention over configuration is something like EJB3 persistence. All you
need to do to make a particular bean persistent is to annotate that class with @Entity.
The framework will then assume table names and column names from the name of the
class and the names of the properties. Hooks are provided for you to override these
names if the need arises, but, in most cases, you will find that using the frameworksupplied
defaults results in a faster project execution.