Directory navigation
Preface
In the previous chapter, we talked about Spring Cloud Stream implementation
This section is the last section of the topic of microservices. Let's make a summary of this topic! There are 16 sections in total, which are:
- Microservice topic 01-Spring Application
- Microservice topic 02-Spring Web MVC view technology
- Microservice topic 03-REST
- Microservice topic 04-Spring WebFlux principle
- Microservice topic 05-Spring WebFlux application
- Microservices topic 06-Cloud Native Applications
- Microservice topic 07-Spring Cloud configuration management
- Microservice topic 08-Spring Cloud service discovery
- Microservice topic 09-Spring Cloud load balancing
- Microservice topic 10-Spring Cloud service circuit breaker
- Microservice topic 11-Spring Cloud service call
- Microservice topic 12-Spring Cloud Gateway
- Microservice topic 13-Spring Cloud Stream (on)
- Microservice topic 14-Spring Cloud Bus
- Microservice topic 15-Spring Cloud Stream implementation
- Microservice topic 16-Spring Cloud overall review
The key points of this section are:
- Java basic review
- Springboot feature review
- Springcloud feature review
Write in front
- Any conclusions need to be verified by procedures (stable reproduction)
- Write code often, watch more, think more
- Train thinking mode (abstract thinking, dialectical thinking, reverse thinking, divergent thinking)
- Original accumulation (JDK, framework: Spring, Tomcat, Log4j, etc.)
- Less pointers to the companion code, and discussion on the plan (whether Code Review thinking is rigorous)
- Willing to share (lectures, technical salons, discussion meetings, etc.)
- How to read books selectively (for reference only)
Recommend a book here:
Link: https://pan.baidu.com/s/1A_QLYev4bQFCtojtmgr-7A
Extraction code: pcxy
copy this content and open the Baidu SkyDrive mobile phone App, the operation is more convenient-from Baidu SkyDrive Super Member V4 Share of
Java basics
tool
To do well, we must first sharpen our tools. Let’s take a look at the basic tools of Java?
1. Java compiler
javax.tools.JavaCompiler
2、Jar = Zip
Spring Boot Fat Jar compression ratio = 0
3、 Java Debug
JDB
ClassLoader
ClassLoader: Java class loader, as one of the core concepts of java, is very important!
-
Class
-
ClassLoader
- Class
- Resource management
- Load Class 1.7 in parallel
- Concurrency (Thread)
- META Space
Beans
Java can be said to be an object-oriented programming language, and this is mainly around beans!
- Introspection (
Introspector
): Java Bean specification + reflection (Reflection) + reference (Reference)- BeanInfo
- PropertyDescriptor
- …
Spring example:
PropertyEditorRegistrar
registrationPropertyEditor
PropertyEditor
Types required for character text transposition
<bean class="User"> <property name="id" value="9" /> <!-- String to Long --> <property name="age" value="32" /> <!-- String to Integer --> </bean>
Evolution of the Java programming model
1. Object-oriented programming (OOP)
- Encapsulation
- Derivative
- Polymorphism
Design Patterns
- GoF 23
- Reactor / Proactor
2. Java 1.2 reflection programming
3、Java 1.3 AOP
4、Java 1.4 NIO(Non-Blocking)
5. Java 1.5 generic/concurrent programming
6. Java 1.6 script programming (JavaScript)
7 、 Java 1.7 NIO 2
8. Java 1.8 Lambda programming
9. Java 9 Modularity/Reactive Programming
A brief history of Spring Framework
Core features
1 、 IoC / DI
Based on Java reflection, Java Beans introspection
2、 AOP
- The interface type is based on Java AOP Proxy
- The class type is implemented based on CgLib promotion
3. Resource management
- ClassLoader
- URL
- I / O
4. Event
- Java standard event/listening mechanism
java.util.EventObject
java.util.EventListener
- Java observer pattern
java.util.Observer
java.util.Observable
5. Internationalization
java.util.ResourceBundle
java.util.PropertyResourceBundle
java.text.MessageFormat
6. Verification
- Validator
- Bean Validation (JSR-303
LocalValidatorFactoryBean
javax.validation.ValidatorFactory
org.springframework.validation.SmartValidator
7, data binding
DataBinder
8. Type conversion
java.beans.PropertyEditor
Convertor
ConversionService
9、 Spring EL
-
JSP EL
-
OGNL
data access
1. Affairs
- JDBC Transaction
- JTA (Java Transaction API)
- JTS(Java Transaction Service)
2、 JDBC
- JDBC -> JdbcTemplate
3 、 ORM
- Hibernate
- iBatis
4、 XML
- SAX(Simple API for XML)
- XML Stream
- JAXB(Java API for XML Binding)
- DOM(Document Object Model)
Web Servlet
Spring MVC
- Early learning from Struts
- Learning from JAX-RS (REST Java Specification)
Web Reactive
Spring WebFlux
- Reactor
- RxJava
- Netty
Spring Framework A programming model
Multiple XML configurations -> Multiple annotation configurations
Spring Boot features
- Automatic assembly: realize the specification is greater than the configuration (reduce the configuration)
- Production-Ready: Improve or simplify the operation and maintenance system of Spring applications
- External configuration: adjust the internal behavior of the application through external configuration
- Embedded container: Assemble an embedded Web container
- Servlet container
- Netty web container
Spring Cloud features
- Service discovery
- Remote call
- Client statement (Feign)
- Service Fuse (Hystrix)
- Load balancing (Ribbon)
- Service call link tracking (Sleuth)
- Distributed configuration
- Version system (Git)
- Distributed implementation (custom implementation)
- Asynchronous message
- Message Bus (Spring Cloud Bus)
- Message integration (Spring Cloud Stream)
- Gateway
- Spring Cloud 1.x / 2.x Zuul
- Spring Cloud Gateway
More
Distributed transaction
Final consistency
- Message-based eventual consistency
Safety
postscript
This is the end of the microservice topic. The next topic preview: Concurrent programming topic
For more architectural knowledge, please pay attention to this series of articles on Java : The Road to Growth of Java Architects