Dark Horse Project Phase I Interview 58 Questions Web14 Questions (2)

8. What is the difference between inner join and outer join queries?

inner join

Get the intersection of two tables

outer join

Get all the data of a table and the intersection data of two tables

9. The role of transaction management, four major characteristics

effect

Ensure that multiple addition, deletion and modification operations either succeed at the same time or fail at the same time

Four characteristics

1.Atomicity

Transactions are the smallest units of atoms, and they both succeed and fail together.

2. Consistency

Understanding 1: Data changes and is saved consistently. For example, if you deposit 500 in the bank, you will get 500.

Understanding 2: The expected value is consistent with the actual value

3. Isolation

Do not affect multiple transactions

4.Persistence

The operation will eventually be persisted to the database

10. Function and composition of JWT token

Used as a mark for login verification to prevent tampering

3 parts

Header, payload, signature Signature

Header

Algorithms and models

Payload

Store data about users

Signature

Combining the first two parts and a key generation

11. How to implement Spring transaction management

Add @Transactional annotation

Scope that can be added : methods, classes, interfaces

Automatically handle runtime exceptions

If you encounter a compile-time exception and need to roll back, add rollbackFor=Exception class.class

To call transactions to each other, you need to use transaction propagation behavior, add propagation=Propagation enumeration, and use SUPPORTS and NOT_SUPPORT.

12. What is transaction communication behavior?

Transactions call each other and propagate behaviors to each other.

There are two, SUPPORTS and NOT_SUPPORT.

For example, Teacher Xiaofeng invites you to dinner.

13. What is AOP and what is it used for? What are the core concepts

what is

Aspect-oriented programming is a programming method that enhances small aspects and aspects of the code, that is, methods.

effect

Methods can be enhanced, such as monitoring the method's running time to make improvements.

Core idea

JoinPoint

The methods that can be controlled by AOP are all methods

NotifyAdvice

Specific actions to strengthen it

Pointcut

Reinforced, specific methods of operation, sentences matching connection points

Aspect

Correspondence between notifications and entry points

Target objectTarget

Write the notification class

14. SpringBoot automatic configuration principle

For details, see SpringBoot principles to review SpringBoot configuration file beans and third-party beans @Conditional annotations and @Import annotations to review automatic configuration brief principles and configure a simple starter_zrc007007's blog - CSDN blog

Guess you like

Origin blog.csdn.net/m0_46948660/article/details/132268209