商城项目_temp记事本

  1. springboot默认 application.properties application.yml
    
    springboot的四种属性注入:
    1,@Autowired注入
    2,构造方法注入
    3,@Bean方法形参注入
    4,直接在@Bean方法上使用@ConfigurationProperties(prefix="前缀名")
    
    包括@Controller+@ResponseBody
    1,RestController
    开启SpringBoot自动配置
    2,EnableAutoConfiguration
    组件扫描 类似于<context:component-scan base-package=""/> 扫描当前所在包以及子包
    3,ComponentScan
    包括 @EnableAutoConfiguration+@ComponentScan+@SpringBootConfiguration
    4,SpringBootApplication
    springboot配置
    5,SpringBootConfiguration
    配置
    6,Configuration
    指定一个资源文件 @PropertySource("classpath:jdbc.properties")
    7,PropertiesSource
    把方法的返回值注入到spring容器
    8,Bean
    注入指定属性值 需要有setter
    9,Value
    指定配置文件 @ConfigurationProperties(prefix = "jdbc")
    10,ConfigurationProperties
    开启配置 @EnableConfigurationProperties(JdbcProperties.class)
    11,EnableConfigurationProperties
  2. Tomcat(前台,后台,用户管理,订单管理,购物车管理...)
    1,单点故障(一台服务器挂了,全部挂,全部访问不了)
    2,并发数低(不能实现高并发)
    3,代码耦合度高,不方便优化(你调用我,我调用你,)
    4,不方便扩展(要么都扩展,要么都不扩展)
    好处:维护简单

猜你喜欢

转载自www.cnblogs.com/taopanfeng/p/11080113.html