首页>代码>ssh框架开发的java个人博客系统-BFblogDemo07>/BFblogDemo07/src/com/ibeifeng/action/GetBlogInfo.java
package com.ibeifeng.action;

import java.util.Map;

import com.ibeifeng.po.BlogInfo;
import com.ibeifeng.service.BlogInfoService;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class GetBlogInfo extends ActionSupport {

	private BlogInfoService blogInfoService;

	public BlogInfoService getBlogInfoService() {
		return blogInfoService;
	}

	public void setBlogInfoService(BlogInfoService blogInfoService) {
		this.blogInfoService = blogInfoService;
	}
	
	public String execute() throws Exception {
		//获得usrname
		Map session = ActionContext.getContext().getSession();
		String username = (String) session.get("username");
		
		//通过业务逻辑组件来查询
		BlogInfo bloginfo  = blogInfoService.getBlogInfo(username);
		
		if(bloginfo != null) {
			session.put("blogtitle", bloginfo.getBlogtitle());
			session.put("idiograph", bloginfo.getIdiograph());
		}
		return this.SUCCESS;
	}
}
最近下载更多
aaaaaaa3333  LV1 2022年5月18日
SOLEIL.  LV3 2021年6月19日
yyyyyyuuuuuu  LV1 2021年2月14日
无情先生3333  LV2 2020年12月29日
skook7  LV2 2020年7月26日
lwp011  LV27 2020年7月7日
1515355665  LV7 2020年7月2日
王步庆  LV9 2020年5月14日
小陆啊  LV2 2020年3月8日
12432423  LV2 2019年12月18日
最近浏览更多
xiaopengzep  LV1 3月25日
WBelong  LV7 2023年12月20日
最代码的苏拉 2023年9月22日
暂无贡献等级
周敏国  LV9 2023年8月21日
Tomcat80  LV4 2023年6月25日
暂无贡献等级
陆程江  LV2 2023年5月28日
yzshabzbbdvw  LV4 2023年5月15日
3516569014  LV5 2023年5月7日
Ali200930  LV2 2023年3月28日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友