- 博客(3)
- 资源 (1)
- 收藏
- 关注
原创 Spring创建bean的三种方式
Spring创建bean的三种方式 1、使用默认构造函数创建 在Spring的配置文件中使用bean标签,配置id和class属性,没有其他属性和标签时,如果类中没有默认构造函数,对象无法创建 public static void main(String[] args) { ApplicationContext ac = new ClassPathXmlApplicationContext...
2019-11-11 17:26:13 250
原创 Spring中用ApplicationContext获取对象
ApplicationContext的三个常用实现类: ClassPathXmlApplicationContext: 可以加载类路径下的配置文件,要求配置文件在类路径下,不在就不行 FileSystemXmlApplicationContext: 可以加载磁盘任意路径下的配置文件(有访问权限) AnnotationConfigApplicationContext: 读取注解创建容器 核心容器两个...
2019-11-11 17:01:23 372
原创 Spring Boot项目JSP页面中文乱码解决
html <meta charset="utf-8" /> application.yml server: tomcat: uri-encoding: utf-8 spring: http: encoding: force: true enabled: true charset: utf-8 传参数乱码 <% ...
2019-11-05 16:47:34 1404
高级进程管理器
2011-10-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人