首页 > 其他 > 详细

常量设置

时间:2015-03-10 13:55:44      阅读:151      评论:0      收藏:0      [点我收藏+]

package com.longtime.ajy.student.config;

 

import org.springframework.context.annotation.Lazy;

 

import org.springframework.stereotype.Component;

import org.springframework.beans.factory.annotation.Value;

 

@Component

@Lazy(false)

public class Constant {

 

    public static String IMG_SERVER_DOWNLOAD;

    public static String IMG_SERVER_UPLOAD;

  

    

    

    @Value("${com.longtime.imgserver.download}")

    public void setImgServerDownload(String imgServerDownload){

        IMG_SERVER_DOWNLOAD = imgServerDownload;

    }

    

    

    @Value("${com.longtime.imgserver.upload}")

    public void setImgServerUpLoad(String imgServerUpload){

        IMG_SERVER_UPLOAD = imgServerUpload;

    }

    

}

 

 

 

页面调用常量:

<%@page import="com.longtime.ajy.student.config.Constant”%>

<%=Constant.IMG_SERVER_DOWNLOAD%>

常量设置

原文:http://www.cnblogs.com/spiritualWindows/p/4325749.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!