Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Spring
springspring开发步骤
导入spring开发基本包坐标
编写Dao接口实现类 Bean
创建Spring核心配置文件 applicationContext.xml
在Spring配置文件中配置UserDaoImpl
使用Spring的API获得Bean实例
Bean标签基本配置基本属性
**id:**Bean实例在Spring容器中的唯一标识
**class:**Bean的全限定名称 (全限定名=包名+类型)
Bean的标签范围配置
singleton
实例化1个
在Spring核心文件被加载时,实例化配置的Bean实例
对象创建在应用加载创建容器时,对象就被创建,只要容器在,对象就一直在,当应用卸载销毁容器时,对象被销毁
protorype
实例化多个
当调用getBean()方法实例化Bean时
使用对象时,创建新的对象实例,只要对象在使用时,就一直在,当对象长时间不用时,被Java的垃圾回收器回收了
Bean生命周期配置
**init-method:**指定类中的初始化方法名称
**destroy-method:**指定类中销毁方法名称
...
YAML基本语法
YAML基本语法1. 基本要求 大小写敏感
数据值前必须有空格作为分隔符
使用缩进表示层级关系
缩进不允许使用Tab键,只允许使用空格
#表示注释
2. 数据格式 对象(map):键值对集合
12person: name: zhangsan
数组:一组按次序排序的值
123address: -beijing -shanghai
纯量:单个不可再分的值
12msg1: 'hello \n world'#单引忽略转义字符msg2: "hello \n world"#双引识别转义字符
3. 参数引用
123name: lisiperson: name: ${name}#引用上面定义的name值
4. Springboot配置 成员变量的名称与配置文件里的名称可不同,但配置文件键的名称要与表达式中的一样
5.注入方式 1)通过@Value
12@Value("${name1}")private String name1;
2)通过@Autow ...
Springboot+vue遇到的问题
Springboot+Vue遇到的问题1.创建Springboot启动application报错1ERROR17200[main]o.s.b.d.LoggingFailureAnalysisReporter :
解决方法:在Application类上增加
1@SpringBootApplication(exclude ={DataSourceAutoConfiguration.class})
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment
