3.18 knowledge blind interview record

Three kinds of injection 1.Spring?

(1) constructor injection;

(2) setter method for injection;

(3) interface injection.

[When the interview just say the first two, the third did not say it]

2. talk about common operations of redis?

https://www.cnblogs.com/iceywu/p/12270857.html

This blog has been written before, but too much time on the command are fuzzy, we need to take another look.

3.AOP section on the section where programming should add transaction?

Programming this section did not feel understood thoroughly, and find time to re-learn a science.

4.spring commonly used annotations?

@Configuration to a class as an IoC container, the head of one of its methods if they are registered @Bean, as will the Spring container Bean.
@Scope annotation scope
@Lazy (true) indicates the initialization delay
@Service label for the business layer components, 
@Controller control layer assembly for labeling (e.g., the action struts)
@Repository for annotation data access components, i.e. DAO components.
@Component refers to the component when the component is not classified, we can use this annotation to mark.
@Scope scope scope specifies (with class)
designated for @PostConstruct initialization method (the method used in)
@PreDestory specifies destruction method (the method used in)
the definition Bean initialization and destruction: @DependsOn order
@Primary: Bean multiple candidates when there is an automatic assembly, is annotated as @Primary Bean will serve as the first choice for those who would otherwise throw an exception
by type assembly, if we want to use the default @Autowired assembly by name, you can combined @Qualifier annotation used together. As follows:
@Autowired @Qualifier ( "personDaoBean") with the use of multiple instances
@Resource name by default assembly when not find a match with the name of the bean will press type assembly.
@PostConstruct initialization comment
@PreDestroy destroy comment on the default boot loader Singleton
@Async asynchronous method call

5.spring mvc return annotation view and return json comment?

@RequestMapping和@ResponseBody

Guess you like

Origin www.cnblogs.com/iceywu/p/12520569.html