configure eclipse for ssh project

1. set classpath

   some functions depend on class path.

For example:

1 @BeforeClass
2     public static void setUpBeforeClass() throws Exception {
3         //get bean from spring
4         appContext = new ClassPathXmlApplicationContext(new String[] {"applicationContext-dao.xml", "applicationContext-hibernate.xml"});
5         BeanFactory factory = appContext;
6         customerDao = (CustomerDao)factory.getBean("customerDao");

not implement yet.

2. set format template

we should make comments for every single java file, every function 

 1 /**
 2      * @return INPUT - username/password empty ERROR - username/password error
 3      *         SUCCESS - login success
 4      */
 5     @Override
 6     public String execute() throws Exception {
 7         /**
 8          * Login workflow: 
 9          * (0) trim username, password 
10          * (1) username/password empty ->empty 
11          * (2) contains illigal char -> username/password wrong
12          * (3) search in DB -> username/password wrong
13          */

we alse should use the javadoc format comments.

/*
 * Copyright (c) 1994, 2009, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.

  

/**
 * The {@code Long} class wraps a value of the primitive type {@code
 * long} in an object. An object of type {@code Long} contains a
 * single field whose type is {@code long}.
 *
 * <p> In addition, this class provides several methods for converting
 * a {@code long} to a {@code String} and a {@code String} to a {@code
 * long}, as well as other constants and methods useful when dealing
 * with a {@code long}.
 *
 * <p>Implementation note: The implementations of the "bit twiddling"
 * methods (such as {@link #highestOneBit(long) highestOneBit} and
 * {@link #numberOfTrailingZeros(long) numberOfTrailingZeros}) are
 * based on material from Henry S. Warren, Jr.'s <i>Hacker's
 * Delight</i>, (Addison Wesley, 2002).
 *
 * @author  Lee Boynton
 * @author  Arthur van Hoff
 * @author  Josh Bloch
 * @author  Joseph D. Darcy
 * @since   JDK1.0
 */
public final class Long extends Number implements Comparable<Long> {

  

  /**
     * Returns a string representation of the {@code long}
     * argument as an unsigned integer in base&nbsp;16.
     *
     * <p>The unsigned {@code long} value is the argument plus
     * 2<sup>64</sup> if the argument is negative; otherwise, it is
     * equal to the argument.  This value is converted to a string of
     * ASCII digits in hexadecimal (base&nbsp;16) with no extra
     * leading {@code 0}s.  If the unsigned magnitude is zero, it
     * is represented by a single zero character {@code '0'}
     * (<code>'&#92;u0030'</code>); otherwise, the first character of
     * the representation of the unsigned magnitude will not be the
     * zero character. The following characters are used as
     * hexadecimal digits:
     *
     * <blockquote>
     *  {@code 0123456789abcdef}
     * </blockquote>
     *
     * These are the characters <code>'&#92;u0030'</code> through
     * <code>'&#92;u0039'</code> and  <code>'&#92;u0061'</code> through
     * <code>'&#92;u0066'</code>.  If uppercase letters are desired,
     * the {@link java.lang.String#toUpperCase()} method may be called
     * on the result:
     *
     * <blockquote>
     *  {@code Long.toHexString(n).toUpperCase()}
     * </blockquote>
     *
     * @param   i   a {@code long} to be converted to a string.
     * @return  the string representation of the unsigned {@code long}
     *          value represented by the argument in hexadecimal
     *          (base&nbsp;16).
     * @since   JDK 1.0.2
     */
    public static String toHexString(long i) {

not implement yet.

3. install some plugins

Hibernate-Tools

git

not implement yet.

4.other

原文地址:https://www.cnblogs.com/harrysun/p/3244912.html