Тренингът се води от Траян Илиев, Oracle® сертифициран Java програмист с 15 годишен опит, разработчик на end-to-end reactive fullstack приложения с ES6/7, TypeScript, Angular, React и Vue, 12+ години опит като IT трейнър за международни софтуерни компании. Има множество презентации на Voxxed Days, jPrime, jProfessionals, BGOUG, BGJUG, DEV.BG на теми като SOA & REST (JAX-RS, Microservices), Spring 5 и Spring Reactor, Java EE 7, CDI, Angular, React, Redux, high-performance Java programming.
Целева аудитория: Java developers with practical experience building server-side applications.
Продължителност: 50 часа
Цена: 560 лева
Описание на курса:The course introduces to enterprise SOA & web application development using Spring 5 platform. The main topics include:
- Introduction to Spring – evolution of Spring framework, main features. Introduction to Maven and Gradle. Building a HelloSpring application using XML and annotation-based configurations. (2 h)
- Inversion of Control (IoC) and Dependency Injection (DI) in Spring– lookup vs. injection, constructor, setter and field-based DI. Instantiating the container. Beans and BeanFactory implementations. 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. Method and lookup method injection. (4 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, **Aware interfaces. Bean definition inheritance. Container Extension Points. 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. The Groovy bean definition DSL. (4 h)
- Resources and resource loaders. Validation, data binding, and type conversion. JSR-349 Bean Validation 1.1. Spring’s Validator interface. Resolving codes to error messages. Bean manipulation using BeanWrapper. PropertyEditors and type conversion. Null-safety annotations. (2 h)
- Spring Expression Language (SpEL). Aspect Oriented Programming (AOP) with Spring. AOP concepts – aspect, advice, joint point, pointcut, introduction, target object, AOP proxy. Types of advices. Dynamic proxies. @AspectJ and schema-based AOP support. Declaring pointcuts. Advisors – examples: declarative transactions, retrying operation execution. Spring AOP APIs. Using the ProxyFactoryBean to create AOP proxies. Creating AOP proxies programmatically with the ProxyFactory. Autoproxy bean definitions. Target sources – swapping, pooling, ThreadLocal. Custom advises. (4 h)
- Spring JDBC Support – DAO pattern, simple relational DB example, Spring JDBC Infrastructure, database Connections and DataSources, embedded database support, exception handling. JdbcTemplate class. Retrieving nested entities with ResultSetExtractor. Spring classes modelling main JDBC operations. Inserting data and retrieving the generated key. Batching operations. Calling stored procedures/functions. Spring Data project – JDBC extensions. Spring Boot starter JDBC. (4 h)
- Object to Relational Mapping (ORM). Using Hibernate with Spring – Hibernate API vs. 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. Tracking entity changes using Auditable interface or annotations. Tracking entity versions using Hibernate Envers. Spring Boot starter data JPA. Validation using Beans Validation 1.1 annotations. Considerations choosing the right data management approach. (6 h)
- Transaction management – transaction types, PlatformTransactionManager, TransactionDefinition and TransactionStatus interfaces, AOP-based transaction management configuration. Using programmatic transactions. Using global Java Transaction API (JTA) transactions with Spring. Considerations choosing the right type of transaction management. (2 h)
- Using Spring Remoting – Spring HTTP invoker, JMS with Spring, AMQP with RabbitMQ. Building custom service with JPA, Hibernate and Spring Web MVC – @EnableWebMvc, WebMvcConfigurer and WebApplicationInitializer interfaces. Exposing the service using HTTP invoker. Testing the service using HttpInvokerProxyFactoryBean client. Using Java Messaging Service (JMS) with HornetQ – basic concepts and patterns, queues and topics, HornetQ JMS ConnectionFactory configuration. Implementing a JMS Listener in Spring – @JmsListener, onMessage. Sending JMS Messages. JMS with Spring Boot Artemis starter. Remoting using AMQP in Spring with RabbitMQ. Using AMQP with Spring Boot. (6 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 WebMVC 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, AuthenticationManagerBuilder. RESTful web services with Spring Boot. (4 h)
- Spring applications monitoring and testing – unit, integration, front-end (end-to-end), and performance testing. Using Spring Test annotations. Unit testing Spring components using Junit 5 Jupiter and Mockito. Integration testing – configuring service-layer testing profile, implementing TestExecutionListener interface. End-to-end testing using Selenium. Using VisualVM for JMX monitoring, Hibernate statistics. Using JMX with Spring Boot. (6 h)
The course contains 50% presentations and demonstrations, and 50% lab exercises, conducted in parallel to achieve immediate reinforcement of concepts in practice.
Participants will learn how to build Spring web apps and services with Hibernate, Spring Web MVC, and REST. Study is conducted in small groups – up to 10 persons. During the course there will be opportunity for discussion of additional questions the participants are interested in.
Viewing detailed program of the course in PDF format (in a new browser window) For more information and registration, please send us an e-mail at: email@example.com