MVCSR의 일반적인, 더 완전한 Java 패키지 구조 (모델, 뷰, 컨트롤러, 서비스, 저장소) 웹 응용 프로그램은 간다 뭔가 같은 :
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.
안녕하세요. 답장을 보내 주셔서 감사합니다. 나는 그것을 시도했지만 우리는 ejb의 기타 물건을 사용하지 않을 것이다. 이 외에도 스프링 컨트롤러, 모델, 서비스, 비즈니스 로직, 다양한 인터페이스 등 클래스를 구성하는 방법은 무엇입니까? – ashishjmeshram
는 spring-mvc-jpa-archetype을 사용하는 나의 대답을 업데이트했습니다. – sbridges