1. With regard to SOLR.
During the interview, one of the interviewers asked me what package you used when you used SOLR, and I went back and checked it out before I knew it was a ARG,APACHE.SOLR package. If you configure it, you only need to import a third-party jar package and then create a word breaker object in your code to use it.
Use process:
1. Introduction of related SOLR packages in the project
2. Specify the SOLR server address. Creates a Solrservcer object.
3. Import the specified Index object into the SOLR index library.
2. How to control the role check
There are four ways: 1.url-level permission Control 2. Method annotation permission Control 3. Code level Permission Control 4. Page Label Permission control
3. Principle of Reflection
The main thing is to load the. class file by the ClassLoader.
4. Focus on common design patterns
(1). Factory mode: Implement different interfaces to create different objects and create procedures in their subclasses.
Application Example: Hibernate change database only need to change dialect and drive on it. (beanfactory). Suitable for generating complex objects.
Advantages: Want to create an object only need to know its name on the line, extensibility is good, if you want to add a class, only need to add a factory class on it.
The disadvantage is also obvious, each additional class will need to add a factory entity class.
(2). Single Case model: This model belongs to the creation pattern.
Application: Only one instance is required.
Advantage: This class ensures that only a single object is created, which provides a way to access its unique object and can be accessed directly without creating an instance of it. There is only one instance of memory, which reduces memory overhead, especially the frequent creation of destruction instances.
Disadvantage: No interface cannot inherit, conflict with single duty principle,
(3) Decorated mode:
For packaging the original class, to ensure that the original class complete in the case of providing additional functionality,
Advantages: Decorated with no coupling between decoration, decorative mode can dynamically extend the function of a implementation class.
Disadvantage: Multilayer decoration is more complex.
5. Data Mode database storage data mode.
The data pattern has both external and internal patterns,
External mode: A database can have more than one external mode, external mode is the user view, external mode is to ensure data security an effective Measure
Internal mode: A database can only have one internal mode, in order to reduce data redundancy, improve efficiency, improve performance.
6. Data structure:
Data structure refers to the relationship between elements in the same data element, including: logical structure, storage structure and data operation.
7.spring
AOP: Slice-oriented programming
Through precompilation and runtime dynamic agents (Cglib and JDK proxy) to achieve the unified maintenance of program functions,
Application scenarios: Things, permissions, error handling
IOC: Control reversal:
On a traditional project, the caller creates the callee, and in spring, the creation works to spring, so it's called inversion of control and then injected into the caller, which is dependency injection.
8.restful:
is a kind of architectural style, you can think of a network address corresponding to a resource,
JSON as the return value type.