Skip to content

Instantly share code, notes, and snippets.


chenrui chenrui333

Block or report user

Report or block chenrui333

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
chenrui333 /
Created Sep 25, 2016
Work related to gradle issues

Multiple versions of gradle

./gradlew will download the diff versions of gradle into dists folder

ref: gardle_wrapper_doc vs

  • (contains binaries, sources and offline documentation)
  • (only binaries)
  • (ony source code)
chenrui333 /
Last active Sep 21, 2016
jenkins builds failure troubleshooting log

Jenkins build failure troubleshooting

This gist serves the troubleshooting process of some Jenkins build failures.


Dealing with the error messages

Here are a few simple recommendations for dealing with returned email messages, especially if there are unfamiliar returned email error messages.


  • Contact the person you're trying to mail by other means. They may not know they are bouncing mail.
  • Keep the returned message. It can help our tech support staff solve the problem quickly. It also (usually) contains the original message, which you may need to resend after the problem is fixed.
  • Try to send yourself a test message if someone tells you your email account is bouncing mail.

In today's team meeting, I learned an important that generally the constructor injection should be used as possible over setter injection.

  • Historically the setter-injection camp come from spring, whereas constructor-injection camp are from pico-container and GUICE. [ref][ref-1]
  • constructor injection is the way to indicate the class design problem, like if you have multiple dependnecies (usually more than three dependencies), you should re-think about the class redesign [ref][ref-2]
  • More comprehensive article with bounce of refences [ref][ref-3]

But in the team meeting, my teammate argues from the unit test perspective, which I dont think it makes too much sense, as we are using Spock to deal with the unit testing, and it can handle static or private fields pretty well.

import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.*;
import javax.sql.DataSource;
You can’t perform that action at this time.