标签:des http color java 使用 os strong 文件
附:部门统一的eclipse模版
alibaba_codetemplates.xml
alibaba_codeconventions.xml
/* * Copyright 2013 Alibaba.com All right reserved. This software is the * confidential and proprietary information of Alibaba.com ("Confidential * Information"). You shall not disclose such Confidential Information and shall * use it only in accordance with the terms of the license agreement you entered * into with Alibaba.com. */ |
/** * 这是一个测试类。<br/> * 具体如下:<br/> * 1. xxx * 2. yyy * @author ??? */ |
private String loginName; //登录名称 或 /** 登录名称 */ private String loginName; 注意:API定义请使用 /** xxx */ 方式注释,方便生成javaDoc |
/** 成功 */ public static final String SUCCESS = "1000" ; |
public void test(){ String a = x; //xxx 或者 //xxx String b = x; } |
<!-- 这是一段xml类型的注释 --> |
#database my.database.username=${my_database_username} my.database.driver.password.encrypted=${my_database_driver_password_encrypted} my..database.driver.url=${my_database_driver_url} #dubbo my.dubbo.registry.address=${my_dubbo_registry_address} my.service.version=${my_service_version} |
auto-conf.xml
<generate template= "common.properties.vm" destfile= "config/common.properties" charset= "utf8" /> |
spring的xml文件使用placeholder方式
<!-- 声明placeholder并指定properties文件地址 --> <bean class = "org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" > <property name= "location" > <value>classpath*:/config/*.properties</value> </property> </bean> <!-- 使用${xxx}方式引用.properties文件的内容 --> <dubbo:registry address= "${my.dubbo.registry.address}" /> |
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.aliyun.basicservicecenter.demo.services.DemoService; public class DemoServiceImpl implements DemoService { private static final Logger log = LoggerFactory.getLogger(DemoServiceImpl. class ); @Override public String hello(String name) { if (log.isInfoEnabled()) { log.info( "test" ); } return "hello" + name; } } |
http://www.oracle.com/technetwork/java/javase/documentation/codeconvtoc-136057.html
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html
标签:des http color java 使用 os strong 文件
原文地址:http://www.cnblogs.com/root-wang/p/3880378.html