Mall project _temp Notepad

  1. springboot default application.properties application.yml 
    
    four attributes of injection springboot:
     . 1 , Autowired is injected @
     2 , Constructor injection
     . 3 , a method parameter injection Bean @
     4, using @ConfigurationProperties (prefix = "name prefix method directly on @Bean " ) 
    
    comprising @Controller + @ResponseBody
     . 1 , RestController 
    open SpringBoot autoconfiguration
     2 , EnableAutoConfiguration 
    component scans similar <context: scan-base- component package =" "/> scans the current sub-packet and the packet is located
     . 3 , ComponentScan 
    comprising @EnableAutoConfiguration + ComponentScan + @ @SpringBootConfiguration
     . 4 , SpringBootApplication 
    springboot configuration
     5, SpringBootConfiguration 
    configuration
     . 6 , the Configuration 
    specify a resource file @PropertySource ( "CLASSPATH: the jdbc.properties" )
     . 7 , PropertiesSource 
    return value to the method of injecting spring containers
     . 8 , Bean 
    injection attribute values needed to specify the setter
     . 9 , the Value 
    specified profile @ configuration Properties (prefix = "JDBC" )
     10 , configuration Properties 
    open configuration @EnableConfigurationProperties (JdbcProperties. class )
     . 11, EnableConfigurationProperties

     

  2. Tomcat (foreground, background, user management, order management, shopping cart management ...)
     1 , single point of failure (one server hung up, all linked, not all access)
     2 , lower the number of concurrent (can not achieve high concurrency)
     3 code coupling high, convenient optimization (you call me, I call to you,)
     4 , convenient extension (either all extended or not extended) 
    benefits: simple maintenance

     

Guess you like

Origin www.cnblogs.com/taopanfeng/p/11080113.html