Saturday-Sunday, 5 weeks (40 hours). Price: 420 leva. (Special price for students: 350 leva)
Training is conducted by Trayan Iliev, Oracle® certified Java programmer with 15 years experience, developer of end-to-end reactive fullstack apps with ES6/7, TypeScript, Angular, React and Vue, 12+ years experience as IT trainer for international software companies. Regular speaker at developer conferences – Voxxed Days, jPrime, jProfessionals, BGOUG, BGJUG, DEV.BG on topics as SOA & REST (JAX-RS, Microservices), Spring 5 & Spring Reactor, Java EE 7, CDI, Angular, React, Redux, high-performance Java programming.
Duration: 40 hours
Price: 420 leva/ 350 leva for students
Target audience: Java SE/ Web developers
- Embrace the rich opportunities for rapid Java Web and SOA application development with Spring 5 ecosystem of projects and modules;
- End-to-end web projects – develop, deploy, optimize, secure, and test production grade web applications, services and clients with Hibernate, Spring MVC & REST;
- Plenty of hands-on experience with Java 9, Spring Boot, Hibernate, JPA, Spring MVC, Spring Data, Spring Security, Spring MVC Test framework, JUnit, Mockito;
- Novelties in Java 8 and 9, Spring 5 WebFlux & Spring Boot 2.0 – functional reactive programming, real time event streaming, and security model.
- Introduction to Spring – evolution of Java Spring framework, main features, Spring main modules. Introduction to Maven and Gradle for Java. Building a HelloSpring application using XML and annotation-based configurations. Introduction to Spring Boot – building HelloSpringMVC simple web application using spring-boot-starter-web. Configuring dispatcher, resolver, static resources, locale, multipart, error handling and encoding with Spring Boot and Spring embedded Java servlet container (Tomcat). (2 h)
- Inversion of Control (IoC) and Dependency Injection (DI) in Spring – lookup vs. injection, constructor, setter and field-based DI in Java. Instantiating the container. Beans and BeanFactory Configuring ApplicationContext – basic configuration, classpath scanning and filters, component declaring meta-annotations. XML-based configuration using GenericXmlApplicationContext. Java annotations configuration (@Bean, @Configuration, @ComponentScan) – AnnotationConfigApplicationContext. Mixing XML & Java – @Import, @ImportResource. Instantiating beans using constructor and static/instance factory methods. Dependency resolution process. Dependencies and configuration in detail – values, bean references, inner beans, collections, maps, null handling, p- and c-namespaces, compound property names, depends-on, lazy initialization, autowiring. Excluding a bean from autowiring. Limitations and disadvantages of autowiring. (4 h)
- Introduction to Spring Web MVC – Spring MVC architecture: DispatcherServlet, HandlerMappingm Controller, ViewResolver, View. Using Thymeleaf templates to build our first page. Building simple controller – @Controller, @RequestMapping. Passing data to the View using Model, ModelMap, and ModelAndView. Getting data with a request parameter – @RequestParam. Building a sample Spring MVC application. (2 h)
- Inversion of Control (IoC) and Dependency Injection (DI) in Spring (Advanced) – Bean scopes – singleton, request, session, application, websocket, and custom scopes. Web configuration. Scoped beans as dependencies – <aop:scoped-proxy>. Lifecycle callbacks – initialization, destruction, @PostConstruct, @PreDestroy. ApplicationContextAware, BeanNameAware interfaces. Using Spring resource injection annotations – @Autowired, @Component, @Scope, @Value, @Required, @Qualifier, @Lazy, @Primary. Using JSR 330 standard annotations – @Resource, @Inject, @Named, @ManagedBean, @Qualifier, @Alternative. Environment and profiles, @PropertySource. I18N using MessageSource. Events and event listeners – @EventListener, @Order, @Async. (3 h)
- Resources and resource loaders. Validation, data binding, and type conversion. JSR-349 Bean Validation 1.1. Spring’s Validator Resolving codes to error messages. PropertyEditors and type conversion. Null-safety annotations. (1 h)
- Handling forms and complex URL mapping – validation, customizing validation messages. Enabling internationalization (i18n) and localization (l10n) – configuring i18n in the DispatcherServlet configuration, changing locale, translating application text. Displaying lists. Request mapping in depth – HTTP methods, URI patterns, suffix match, matrix variables, parameters, headers. Handling file uploads. Handling errors and error message translation. Custom error pages. Using sessions. (3 h)
- Introduction to Spring Expression Language (SpEL) and Aspect Oriented Programming (AOP) with Spring. AOP concepts – aspect, advice, joint point, pointcut, introduction, target object, AOP proxy. Types of advices. Dynamic proxies. Declaring Advisors examples: declarative transactions, retrying operation execution. (2 h)
- Spring JDBC Support – DAO pattern, simple relational DB example, Spring JDBC Infrastructure, database Connections and DataSources, embedded database support, exception handling. JdbcTemplate Retrieving nested entities with ResultSetExtractor. Spring classes modelling main JDBC operations. Inserting data and retrieving the generated key. Spring Data project – JDBC extensions. Spring Boot starter JDBC. (3 h)
- Object to Relational Mapping (ORM). Using Hibernate and JPA with Spring. Transactions – Hibernate API Java Persistence API (JPA). Important ORM concepts using Hibernate. Configuring the Hibernate SessionFactory. ORM mapping using Hibernate annotations. Hibernate Session interface – querying, inserting, updating and deleting data. Annotating fields or properties. Spring Data access using JPA 2.1 – ORM mapping using JPA annotations, database operations using JPA Repository abstraction, custom queries. Spring Boot starter data JPA. Validation using Beans Validation annotations. Considerations choosing the right data management approach. (4 h)
- Transaction management – transaction types, interfaces PlatformTransactionManager, TransactionDefinition and TransactionStatus, AOP-based transaction management config. Using programmatic transactions. (1 h)
- Building RESTful Web Services with Spring – introduction to SOA, REST and HATEOAS, levels of maturity of web applications, resources and sub-resources, URI templates. Using Spring MVC to expose RESTful web services – @Controller, @RequestMapping, @ResponseBody, @RestController. Configuring JSON/XML data binding. Configuring Spring web application. Using curl client to test the REST service. Building dedicated Spring client using RestTemplate. Securing RESTful web service with Spring Security – @EnableWebSecurity, WebSecurityConfigurerAdapter, HttpSecurity, Documentation with Swagger. RESTful web services with Spring Boot. (3 h)
- Building fully featured web applications with Spring Web MVC – implementing multi-layer web applications including DAO, service and presentation layers. Spring MVC architecture – requests life-cycle, responding to normal HTTP and Ajax requests, WebApplicationContext hierarchy, main components – handlers, handler interceptors, error and view resolvers, configuration. Spring integration with different view technologies. Implementing views with Thymeleaf. Securing web apps with Spring Security. Cross Origin Resource Sharing (CORS). Production grade Spring MVC optimizations – gzipping, cache control, using application cache (@EnableCaching, CacheManager, @Cacheable, @CachEvict, @CachePut, @Caching, @CacheConfig), async methods, ETags (ShallowEtagHeaderFilter). Using WebSocket API with Spring and SockJS. (4 h)
- Spring web application testing – TDD, unit, integration, front-end (end-to-end), and performance testing. Mocks and stubs. Using Spring Testing Unit testing Spring components using JUnit and Mockito. Integration testing – configuring service-layer testing profile, Spring MVC Test framework. End-to-end testing with Selenium / FluentLenium.(4 h)
- Novelties in Spring 5: WebFlux – reactive programming, Reactive Streams Pproject Reactor. REST services with WebFlux –annotation-based and functional reactive. Router, handler and filter functions. Reactive repositories and database access with Spring Data. End-to-end non-blocking reactive web services with Netty. Reactive WebClients and integration testing. Reactive WebSocket Real-time event streaming to JS clients using SSE. (4 h)
Presentations, demonstrations, and hands-on exercises are conducted in parallel to achieve immediate reinforcement of concepts in practice.
Participants will learn how to develop, deploy, and test production grade, secure web apps and services with Spring Boot, Hibernate, Spring MVC, and REST. Study is conducted in small groups – up to 10 persons. During the training there will be opportunity for discussion of additional questions the participants are interested in.