Face questions, two

1. What is SSM

SSM has many built version, for example, there is a version can be set up so the two core configuration file web.xml, applicationContext.xml. 1`` front end controller DispatcherServlet

2`` Filter CharacterEncodingFilter

applicationContext.xml

1.扫描包 `package="cn"/>

2``.mvc drive

3.事务驱动 `"txManager"/>

4 'configuration data source

5``.SqlSessionFactoryBean

6`` Configuration Services

7`` data mapper

8``. View resolvers

2. Design a right to limit module?

Permissions module is the security system of the database, decide who can use, who have authority, have user, role, permission table,, role-permission association table (code table) by associating user-role, to assign the roles rights, the role of issuance of permissions to the user.

3. What is a docker?

Docker is an open source application container engine that lets developers can package their applications and dependencies into a portable mirror, and then publish to any of the popular Linux or Windows machine can be virtualized. The container is full use of the sandbox mechanism will not have any interface with each other.

4. What is dockfile?

Dockerfile is a text file that contains a command combination image can be used to call any command on the command line.

5. What is the docker-compose?

Can manage multiple Docker containers composed of an application, custom profiles docker-compose.yml a YML format, written to call the relationship between multiple containers. Then, whenever a command, you can simultaneously activate / deactivate these containers.

6. What is Portainer?

Portainer Docker is a graphical management tool

7. What version docker used in the company is what?

18.09.7

8. relations mirroring and container steps for deletion mirror? ?

The container is writable, readable image. Examples of containers are mirrored backup image is a static container.

Delete containers after removing the mirror. After the first cut container delete Mirror Mirror unless the container is not possible to remove the mirror directly

What is the principle and the difference between set and setnx based setnx of redis 9. Distributed Lock is?

Distributed Lock based setnx principle, if SETNX returns 1, indicating that the process to obtain a lock. If SETNX returns 0, indicating that the lock has been obtained by other processes, the process can not enter the critical region. The process can continue to try SETNX operate in a loop to get the lock.

redis the set value is the string value associated with the key. If the key has been held by other values, SET will overwrite the old values, ignoring type.

setnx if and only if the key does not exist, the value may be set value. If a given key already exists, SETNX do nothing.

10. What is springcloud, springcloud What are the components? Under its principles describe?

SpringCloud architecture is the core of the Eureka registry, it is an address book. C p-side and end all will be registered in the above, cloud-side call in c p-side application components feign call. Application causes problems when a network request, hystrix components to achieve fault tolerance. The user requests a large amount, the load balancing client used ribbon assembly. And the server load balancing typically use nginx reverse proxy. SpringCloud have components similar to servlet filters, zuul gateway component of the entire service architecture security filtering. When a service call multiple components feign time, sleuth + zipkin component is used to track the service can be used to debug interface (tracing). config components unified configuration.

dubbo based RPC, SpringCloud based RESTful.

组件 ribbon, feign, hstrix, eureka, zuul.

11. What is jmeter?

Apache JMeter is a Java-based stress test tools developed by Apache. For software to do the stress test, which was originally designed for testing Web applications, but later extended to other test areas. Sends a request to the server, access to the target service statistics, generate reports in different formats.

12. What is mybatis?

A durable layer framework, similar to JDBC database access operations, we say that the object has to use JDBC Connection object, PreparedStatement objects, ResultSet object. The core object Mybatis framework has SqlSessionFactoryBuilder objects, SqlSessionFactory objects, SqlSession object. And the biggest difference myibatis framework and hibernate framework lies in its flexibility mybatis relatively high.

13.SpringMVC workflow?

1, the user sends a request to the front-end controller * DispactherServlet *

2, DispatcherServlet HandlerMapping call processor receives a request mapper.

3, the processor mappers find specific processor (depending on the configuration xml, notes to find), the object is generated processors and processor interceptors (if there is generated) together return to DispatcherServlet.

4, DispatcherServlet call HandlerAdapter processor adapter.

5, HandlerAdapter through specific adaptation call processor (Controller, also known as back-end).

6, Controller execute complete return ModelAndView.

7, HandlerAdapter the controller ModelAndView the results back to the DispatcherServlet.

8, DispatcherServlet ModelAndView will pass ViewReslover view resolver.

9, ViewReslover returns parsed particular View.

10, DispatcherServlet render view (model data coming filled view) The View.

11, DispatcherServlet user response. * *

14. What is the message middleware?

Middleware message using message passing efficient and reliable data transmission asynchronous distributed system integration and data communication based. By providing a message queue and the message passing model, inter-process communication can be extended in a distributed environment.

For example: like to buy things in Taobao above the merchant send you business just to give rookie Inn Express on it by the way, you do not need to direct, rookie Inn by asking it when you have time you post to rookie send requests have time, then rookie Inn can directly express to you, in which rookie Inn role is to act as messaging middleware

15. The distributed lock concept?

In a distributed system, due to the distribution of the distributed system, that is multi-threaded and multi-process and distributed in different machines, both the lock will lose the effect of the original lock, we need to implement our own distributed lock - Distributed lock. In a multithreaded environment, multiple threads access the same resource, resulting in thread-safe, the use of distributed lock this thread to solve security problems.

Distributed buying used distributed lock, lock; the second user to wait for the completion of the first user to be snapped up; use setnx set up to solve the security problem, the disadvantage is low performance.

16, HashMap underlying principle

+ HashMap from the list consisting of an array, the array is subject HashMap, the list is mainly to resolve hash collision exists, if the location does not contain the list to an array of position (current entry point to the next null), then to find, add and other fast operation, only one address can; if targeted to the array contains the list for the add operation, first traverse the list, there is that is covered, or new; for the search operation is concerned, still need to traverse the list, and then by equals method key objects one by one to find the comparison. Therefore, performance considerations, HashMap appear in the list, the less the better the performance will be.

17, garbage collection principles

When the programmer to create an object, gc began to monitor this address, size and use of objects, usually, gc record and manage all objects in the heap memory with Figure there, determine which objects in this way is " Da / unreachable "when determined to be" unreachable "time, gc have the responsibility to recover the object, to save memory space

18, Es understanding of the search engine

elasticsearch based on Lucene is a highly scalable, distributed search server that supports out of the box. Hides the complexity of Lucene, provide external interfaces to operate Restful index search. The index is structured as follows:

1, the document contents to be searched word, all the ingredients are not repeated phrase word list.

2, the final document will search for ways to Document stored.

3, every word and docment are associated.

19, what is the thread deadlock

In the case of a thread deadlock is thread-locking, which has a process to obtain the lock, but the process does not get in the future to lock and then unlock the lock, so that the following process can no longer get into the lock, which is dead thread lock, we solve the problem thread deadlock usually give a thread lock to set an expiration date, after the time when the thread gets the lock, time expires, the lock automatically deleted

20, next please describe JDBC is how to handle the incoming parameters in sql

1, load the database driver

2, database links

3, establish a database connection

4, prepared sql statement

5, filling sql statement

6, the results set

7, free up resources

Principle caching mechanism under redis 21, please describe

The client sends a request, such as a query to the server, the server does not cache if necessary each time to find a relational database, if you send the same query request times 100w 100w will go to the database query times increase pressure database also very slow, low performance, then the introduction of redis cache, the user first sends a query to search requests on to redis there is no time, no longer follow the words of the database, query cache to store the results, next time have the same request, do not go into a relational database, direct look redis, redis non-relational database, data is stored in memory, and high efficiency

Distinction 22, == and equals () of

==: basic data types, the comparison is a value, a reference data type, compare the memory address; the equals (): When used as the Object class equals, with the same ==, the memory address value, heavy after writing, to see a specific method, such as string it is only after rewriting string comparison is not the same

Guess you like

Origin www.cnblogs.com/zhaozhitong/p/12450091.html