zoukankan      html  css  js  c++  java
  • 静态代码块

    public class DBUtils {
    
        private static String url=null;
        private static String username=null;
        private static String password=null;
        
        static{
            try{
                Properties dBJavaPro=FileUtils.getProByFileName("jdbc_moblie.properties");
                url=dBJavaPro.getProperty("url").toString();
                username=dBJavaPro.getProperty("username").toString();
                password=dBJavaPro.getProperty("password").toString();
                Class.forName("com.mysql.jdbc.Driver");
            }catch(Exception e){
                e.printStackTrace();
            }
        }
    
    }
    //构造函数
    
    public class MemberAvivaSSoAction extends BaseAction {
        private String key;
        private String getMobileUrl;
        private Long roleId;
        private Long rankId;
    
        public MemberAvivaSSoAction() {
            this.key = (String) PropertyConfigurer.getContextProperty("aviva.cofco.key");
            this.getMobileUrl = (String) PropertyConfigurer.getContextProperty("aviva.cofco.getMobileUrl");
            this.roleId =  Long.parseLong((String)PropertyConfigurer.getContextProperty("aviva.cofco.roleId"));
            this.rankId = Long.parseLong((String) PropertyConfigurer.getContextProperty("aviva.cofco.rankId"));
        }
  • 相关阅读:
    11、sqlite
    10、正则
    9、bs4
    8、异常与import
    7、文件
    6、函数
    4、字典及集合
    3、元组
    1、python基本语法
    shell编程 15 --- shell 脚本调试技巧
  • 原文地址:https://www.cnblogs.com/wangchuanfu/p/6737176.html
Copyright © 2011-2022 走看看