Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Spring classic face questions Share     - Oracle11g Trigger Debugging Record Error: PLS-00201: identifier SYS.DBMS_SYSTEM 'must be declared (Database)

- Getting Started with Linux system to learn: how to configure a static IP address for CentOS7 (Linux)

- Lua study notes under ubuntu (Linux)

- Nginx version information hidden or modified (Server)

- How to prevent page five invisible killer (Linux)

- Linux System Getting Started Tutorial: Linux file permissions brief description (Linux)

- Arrow keys, backspace key garbled in Python-2.7.5 Interactive Mode under CentOS 5.8 (Linux)

- Merge Sort (Programming)

- Open container cluster management system architecture and components introduced Kubernetes (Server)

- Loop arrays in C language is not easy to find a bug (Programming)

- RHEL5 stalled due to power service error system can not start (Linux)

- Use Redis as time-series database: why and how (Database)

- Netapp storage routine inspections and information gathering (Linux)

- Cooling solutions Ubuntu system (Linux)

- Linux Getting Started tutorial: Borrow Windows fonts in Ubuntu 14.10 (Linux)

- Android Service Lifecycle and usage (Programming)

- Ubuntu 15.04 installed JDK and configured as the default JDK (Linux)

- count (*) function in MySQL optimization of InnoDB storage engine (Database)

- How to network to share files between Windows, MAC and Linux (Linux)

- CentOS 6.5 installation and deployment SVN 1.8.10 (Linux)

 
         
  Spring classic face questions Share
     
  Add Date : 2017-01-08      
         
         
         
  Spring share some classic face questions for reference study.

1. Spring's Ioc and aop what principle are implemented?

The main application of the java reflection technology

2. Spring mechanism and Why?

1) spring mvc Please submit all requests to DispatcherServlet, it will delegate the other modules of the application system is responsible is responsible for processing requests real.

2) DispatcherServlet query one or more HandlerMapping, found handling the request Controller.

3) DispatcherServlet please submit a request to the target Controller

4) Controller for business logic processing, returns a ModelAndView

5) Dispathcher query one or more ViewResolver view resolver, find ModelAndView specified object view object

6) view object responsible for rendering back to the client

Why:

AOP allows developers to create non-behavioral concerns, called crosscutting concerns, and insert them into the application code. After using the AOP, public services (such as logging, persistence, transactions, etc.) can be decomposed into context and apply it to domain objects without increasing the complexity of the object model of the domain object.

IOC allows you to create a target application environment can be constructed, and then pass them collaborators to these objects. As indicated by the word upside down, IOC came as anti-JNDI. Do not use a bunch of abstract factories, service locator, single element (singleton) and direct configuration (straight construction), each object is constructed with its collaborators. So it is managed by the container collaborators (collaborator).

Even a Spring AOP framework, is also an IOC container. Spring is the best place it can help you replace the object. With Spring, as long as JavaBean properties and configuration files added dependencies (collaborators). Then it can be easily replaced when needed collaborators have similar interfaces.

3. How to internationalize?

International: do not modify the code, it applies to countries in different languages

Localization: If you want to adapt to a country, you want to modify the source code

Implementation process:

struts-configxml with the following label instructions in the resource file name, just pay attention to the file name, not the national language _

In the resource file by adding the corresponding directory struts adapted to different languages, country properties file

ApplicationResources_zh_properties China

ApplicationResources_en_USproperties us

If it is not English be transcoded

native2ascii -encoding gb2312 source ApplicationResources_zh_Cproperties

used in jsp page

Remove Information

4.Spring the BeanFactory and ApplicationContext difference?

ApplicationContext and BeanFacotry compared to provide more extension, but the main difference is that the latter is lazy loading, if one does not attribute Bean injected after BeanFacotry loaded until the first time you use the call method will throw getBean exception; while the ApplicationContext itself in the initialization test, which will help check whether the dependency property injection; so we usually choose to use ApplicationContext.

5. Tell me what you develop with ssh framework of understanding?

Framework: hibernate, spring, struts;

Hibernate is mainly used for data persistence;

Spring's inversion of control can play the role of decoupling;

Struts is mainly used for process control.

6. Please explain what is MVC? (Design pattern)

A) M ---- Model encapsulate business data and business operations.

B) V ----- View encapsulates the user interface.

C) C ----- Controller encapsulate business processes.

7. MVC various parts of what are the techniques to achieve? How?

The presentation layer struts

Persistence layer hibernate

Control layer spring

Is the most commonly used development framework ssh

8. Adoption of the map, talk about your understanding of the MVC model. (Enterprises are likely to enable students to draw)?

1) The first is to show a view to a user, the user operates on this view, and to fill in some business data

2) The user then click the submit button to request

3) View user requests sent will arrive controller included in the request what you want to accomplish business functions and related data.

4) controller to handle user requests, will request data encapsulation, and then select and call the appropriate model, model request status updates, and then select the next step is to show to the user's view.

5) model will be to handle business functions requested by the user, as well as the model state of maintenance and updating

6) When the model status changes, the model will notify the appropriate view, telling view its status changed.

7) view, by notice to the model, the model will be the status query to obtain data required to show, and then follow the presentation view itself, the data displayed.

8) The next step is to wait for the next user operation from scratch once again reincarnation.
     
         
         
         
  More:      
 
- Tmux Crash Course: Tips and adjustment (Linux)
- A process of how to get the current traffic in GNU Linux (Linux)
- Zorin OS: Linux novice most personal desktop system should be used (Linux)
- Deepin Tutorial: Depth Description Installer expert mode (Linux)
- Depth study and understanding for individual users suicide DDoS attacks (Linux)
- To disable the function by pressing Ctrl-Alt-Del to restart the system in RHEL / CentOS 5/6 (Linux)
- Oracle partition table data migration, process management automation (Database)
- Linux security settings (Linux)
- GRUB and Linux system repair (Linux)
- How to protect your eyes automatically adjust the screen brightness on Linux (Linux)
- Linux installed and tested the deployment of Kafka distributed cluster (Server)
- Development environment to build MEAN In Ubuntu 15.10 (Server)
- mysqldump MySQL command-line tool (Database)
- CentOS 7 virt-manager can not connect a local hypervisor (Linux)
- Installation JDK1.7 under Ubuntu14.04 64-bit (Linux)
- ElasticSearch - Basic Concepts (Server)
- When Vim create Python scripts, vim autocomplete interpreter and encoding method (Programming)
- Java implementation file encryption and decryption (Programming)
- After VMware CentOS full VM clone the network card is unavailable Solutions (Linux)
- Java string concatenation techniques (StringBuilder tips) (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.