Pupils interview Java development of primary road

1. List several common design pattern
A: singleton, factory mode, proxy mode, observer mode, MVC pattern, MVVM pattern
2. AOP what is the actual development of the business scenario which can be used to (in addition to the log, affairs)?
Aspect Oriented Programming AOP is possible independent of those operations, but the service module encapsulation logic invoked, the program facilitates reducing code duplication, to reduce the coupling between modules, improve the maintainability and scalability.
In the actual development in the use of AOP:

Performance statistics / counting
transaction
caching
log print
access control
exception handling

3. AOP notice what?
There are five major types of notifications in Spring AOP

Pre-notification
rear notification
abnormality notification
final notification
around advice

4. generic role?
Generics main role:

Type safety. The main goal is to improve the generic type-safe Java programs. By limiting the generic type definition, the compiler can be assumed that the type of authentication
to eliminate casts. Many casts eliminate the source code, the code is more readable and reduces the chance of error
potential performance gains.

5. List <Map <String, List <String >>> list = new ArrayList <Map <String, List <String >>> assign values (key, value custom)
public class the App {
public static void main (String [ ] args) {
List <the Map <String, List List >> new new = the ArrayList <the Map <String, List >> ();
List = new new stringList the ArrayList <> ();
stringList.add ( "List");
the Map <String , List> = new new the HashMap Map <String, List> ();
map.put ( "One", stringList);
List.add (Map);
System.out.println (List.get (0) .get ( "One ; ") .get (0))
}
}
6. under what circumstances would cause the browser cross-domain requests, how to solve
the browser's same-origin policy will lead to cross-domain, that a domain name to request resources from another domain, protocol, domain names, different ports, cross-domain problem occurs.
There solve cross-domain JSONP, CORS, the postMessage
7. whether used Vue, Vue life cycle What
Vue life cycle are:

Before beforeCreate initialization interface
create: After initialization interface
beforeMount: Rendering ago dom
Mounted: After rendering dom
beforeUpdate: pre-update data
updated: updated data
beforeDestroy: before unloading components
destroyed: After uninstalling components

That is, from the creation, initialization data, compiled templates, mount DOM-> rendering Update -> Render, a series of processes such as the destruction
8. The front-end framework which will be used
Vue.js, jQuery, ElementUI, Bootstrap
execution 9. MySQL how to view sql plan
EXPLAIN sql statement plus
copy the code
10.MySQL the general increase in the index on those fields

Table's primary key and foreign key index
established in the ORDER BY or GROUP BY field index behind
regular table connected to the other tables in the connection field should be indexed
field often appears in the WHERE clause, should be indexed

11.Spring Cloud in which components (the role of each component)

Registry
Services Gateway
Load Balancing
Distributed Configuration
breaker

Published 30 original articles · won praise 47 · views 630

Guess you like

Origin blog.csdn.net/weixin_45579770/article/details/105373818