Skip to content

Instantly share code, notes, and snippets.

:octocat:
Focusing

chenrui chenrui333

:octocat:
Focusing
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
chenrui333 / gradle-issues.md
Created Sep 25, 2016
Work related to gradle issues
View gradle-issues.md

Multiple versions of gradle

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

ref: gardle_wrapper_doc

gradle-x.xx-all.zip vs gradle-x.xx-bin.zip

  • -all.zip (contains binaries, sources and offline documentation)
  • -bin.zip (only binaries)
  • -src.zip (ony source code)
@chenrui333
chenrui333 / Jenkins_build_failure_troubleshooting.md
Last active Sep 21, 2016
jenkins builds failure troubleshooting log
View Jenkins_build_failure_troubleshooting.md

Jenkins build failure troubleshooting

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

View email_delivery_issues.md

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.

Do

  • 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.
View DI_pattern_articles.md

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.

View PersistenceConfig.java
package org.hbsp.cl.directory.config;
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;
@Configuration
You can’t perform that action at this time.