Learn Java for Web Development

(Tina Meador) #1

configuration file, 225
data source, 226
JDBCtemplate, 221, 224
MVC module, 227
ResultSetExtractor interface, 225
stand-alone application, 226
cross-cutting concerns, AOP
BookService interface, 218
configuration file, 219
directory structure, 221
implementation, 218
LoggingAspect, 219
stand-alone application, 220
features
AOP and instrumentation, 204
core container, 204
data access/integration layer, 205
test module, 205
web layer, 205
fundamentals
ApplicationContext interface, 211
attribute, 208
BeanFactory, 210
beans, 207
business logic components, 206
configuration unit, 208
coupling, 206
dependency, 209
encapsulating, 210
inject dependency, 209–210
IoC framework, 206
metadata configuration, 207–208
namespaces, 208
POJO objects, 207
tight coupling, 207
XML-based configuration, 208
tight coupling
API libraries, 214
configuration file, 216
directory structure, 217
getBean( ) method, 216
JARs, 215
loose coupling, 212
project creation, 214
vehicle application, 216
vehicle interface, 212
vehicle service, 213, 215


Spring Tool Suite (STS), 232
Spring Web MVC
application
AddBookController, 252–253, 256, 258
addBook.jsp, 256
annotation-driven, 242
annotations, 257
Annotations-Based BookController, 249
annotations-based strategy, 243
annotations-driven configuration, 251
appServlet, 241
autoregistering bean definitions, 250
bookList.jsp, 255
book service, 254
bookstore, 245
bookstore-servlet.xml, 246–248, 250, 260
BookValidator, 257, 260
contextConfigLocation param, 241
context.xml file, 244
controller annotation, 244
data binding, 251
declaration, 240
deployed, 238
deployment description, 241
directory structure, 248, 257
Eclipse update, 232
GET request, 250, 253
handler method, 244
Hello World, 239, 242
home controller, 243–244
implementation, 244
InitBinder, 253
installer program, 232
instance parameters, 237
Interface Based Bookstore Controller, 247
interface-based controller, 249
Java EE container, 245
JSP file, 243, 245, 248
model attribute, 254
model map, 253
object holding, 254
POST requests, 254
presentation layer, 241
RequestMapping, 250, 253–254
RequestMapping annotation, 244
resources mapping, 242
root-context.xml, 245

Index 445
Free download pdf