a, más completa estructura común de paquete Java para un MVCSR (Modelo, Vista, controlador, Servicio, Repositorio) de aplicaciones web es algo como:
java
└── com
└── youdomain
|
├── base // broadly used app-wide base and abstract classes)
|
├── core // broadly, scattered use helpers, utilities, app health/stats
| // tracking, logging, etc
|
├── controller // Fields Http/CGI requests and drives/initiates request
| // comprehension, validation, security checks, requesting
| // operations by the Service module and invoking the View to
| // generate a response.
|
├── data // This is the lower level data infrastructure, with several
| //packages under it for mappers, schema tables/enums, helpers,
| // record location, id management, etc
|
├── domain // app-wide exposed classes, managers, and interfaces to
| // each persisted (usually DB) domain 'object'. Each
| // object often correlates to one table row in you DB.
| // Domain objects are mostly considered data, but have some fundamental
| // record construction, validation, elaboration, and ancillary information
| // functionality which is opaque to the rest of the application.
| // For example: Customer, Account, Purchase, Inventory,
| // Product, Sale, Return, SpecialOffer, FeedbackComment...
|
├── repository // more complicated persisted objects, often structured
| // to address certain efficiency or traversal needs, often each
| // repository is underpinned by several records, tables,
| // and even cross-DB structures. Example:
| // -- OrderHistory,
| // -- ProductsGlobalSearchIndex,
| // -- CustomerSpecificProductMarketingSuggestionCorrelates
|
├── service // The smarts of the whole application, performs macro, holoistic
| // operations involving multiple DB tables and operations. Such as:
| // -- account.UserAccountLifecycle,
| // -- order.CustomerOrder,
| // -- order.CustomerOrderShipment
|
└── view // Intefaces with your jsp, freemarker, tapestry etc.
Hola. Gracias por la respuesta. Intenté eso pero no utilizaremos las cosas de etc de ejb. Además de esto, ¿cómo estructurar mis clases, es decir, controladores de primavera, modelos, daos, servicios, lógica comercial, varias interfaces, etc.? – ashishjmeshram
actualizó mi respuesta para usar spring-mvc-jpa-archetype – sbridges