|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
初学java Spring代码时看到一个输出不知道是什么意思
代码是在黑马这个机构获取的
- package com.itheima.ui;
- import com.itheima.dao.IAccountDao;
- import com.itheima.service.IAccountService;
- import org.springframework.context.ApplicationContext;
- import org.springframework.context.support.ClassPathXmlApplicationContext;
- public class Client {
- public static void main(String[] args) {
- //1.获取核心容器对象
- ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");
- //2.根据id获取Bean对象
- IAccountService as = ac.getBean("accountService",IAccountService.class);
- IAccountDao adao = ac.getBean("accountDao",IAccountDao.class);
- System.out.println(as);
- System.out.println(adao);
- as.saveAccount();
- adao.saveAccount();
- }
复制代码
输出内容为
com.itheima.service.impl.AccountServiceImpl@4e08711f
com.itheima.dao.impl.AccountDaoImpl@bcec361
对象创建了
保存了账户
红色字体的是什么?
应该是accountService这个对象和accountDao这个对象所在的包的信息加区分对象用的序列码信息
|
|