`
文章列表
首先编写一个日志配置文件log4j.properties:   log4j.rootLogger=ERROR,A1,R  log4j将要输出的log信息定义了五个级别:debug,info,warn,error,fatal ,当输出时,只有级别高于配置中规定的级别信息才能真正的输出。 log4j.appender.A1=org.apache.log4j.ConsoleAppender  Appendee用来指明将所有的log信息存放到什么位置:console,files,GUI components,NT Event Loggers,一个logger可以同时拥有多个Appender ...
服务器中加载web.xml文件的相关内容: <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml ...
try{ conn = ConnectionFactory.getConnction(); state = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); rs = state.executeQuery(sql); while(rs.next()){ Role role = new Role(); int i =1; role.setId(rs.getInt(i++)); role.setAdmins(rs.getString ...
获得 .properties配置资源的方法 public void getpoperties(){ Properties prop = new Properties(); InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("db.prooperties"); try{ prop.load(is); this.driver = prop.getProperty("driver"); this.dburl = ...
Global site tag (gtag.js) - Google Analytics