Mostrando entradas con la etiqueta java. Mostrar todas las entradas
Mostrando entradas con la etiqueta java. Mostrar todas las entradas
04 marzo 2016
23 febrero 2015
10 octubre 2014
#{ JAVA: Spring Integration Mail }
Como configurar correctamente Spring Integration Mail y no morir en el intento.
http://blog.solidcraft.eu/2011/04/read-emails-from-imap-with-spring.html
http://blog.solidcraft.eu/2011/04/read-emails-from-imap-with-spring.html
09 octubre 2014
23 septiembre 2014
#{ TIPS: Log4j prioridad y jerarquía }
Prioridad y precedencia de log4j, por ej. si defino level "DEBUG" se incluyen todos desde "DEBUG" hasta "FATAL".
Sólo uno mayor desactiva hacia abajo en la jerarquía, por ej: "OFF" desactiva todos.
Sólo uno mayor desactiva hacia abajo en la jerarquía, por ej: "OFF" desactiva todos.
public static final int OFF_INT = 2147483647;
public static final int FATAL_INT = 50000;
public static final int ERROR_INT = 40000;
public static final int WARN_INT = 30000;
public static final int INFO_INT = 20000;
public static final int DEBUG_INT = 10000;
public static final int ALL_INT = -2147483648;
28 agosto 2014
08 agosto 2014
#{ TIP: Escribir tildes y caracteres especiales en java }
\u00e1 -> á \u00e9 -> é \u00ed -> í \u00f3 -> ó \u00fa -> ú \u00c1 -> Á \u00c9 -> É \u00cd -> Í \u00d3 -> Ó \u00da -> Ú \u00f1 -> ñ \u00d1 -> Ñ
01 abril 2014
07 febrero 2014
#{ TIP: Builder Pattern }
Builder Pattern ejemplo, queda bonito llamar a los constructores así, además se bypassear, los valores por defecto de los métodos (default value parameter) como por ejemplo se puede hacer en otros lenguajes como C++ o ActionScript3 por ejemplo:
void parameterizedMethod(float param1, int param2, bool param3=false);En JAVA se puede "bypassear" con la siguiente técnica:
public class StudentBuilder
{
private String _name;
private int _age = 14; // this has a default
private String _motto = ""; // most students don't have one
public StudentBuilder() { }
public Student buildStudent()
{
return new Student(_name, _age, _motto);
}
public StudentBuilder name(String _name)
{
this._name = _name;
return this;
}
public StudentBuilder age(int _age)
{
this._age = _age;
return this;
}
public StudentBuilder motto(String _motto)
{
this._motto = _motto;
return this;
}
}
Student s1 = new StudentBuilder().name("Eli").buildStudent();
Student s2 = new StudentBuilder()
.name("Spicoli")
.age(16)
.motto("Aloha, Mr Hand")
.buildStudent();
http://stackoverflow.com/questions/222214/managing-constructors-with-many-parameters-in-java-1-4/222295#222295
22 enero 2014
18 enero 2014
16 enero 2014
02 enero 2014
#{ TIP: Correr casi 'infinito' evitando stackoverflowerror }
public static void foo() {
try {
foo();
} finally {
foo();
}
}
public static void bar() {
bar();
}
http://stackoverflow.com/questions/12438786/try-finally-block-prevents-stackoverflowerror
06 noviembre 2013
#{ JAVA: Checking NULLS, buenas prácticas etc. }
"I call it my billion-dollar mistake." - Sir C. A. R. Hoare, on his invention of the null reference
http://jms32.eresmas.net/web2008/documentos/informatica/documentacion/logica/patrones/patronSpecialCase_NullObject/2012_08_30_Special_Case_Pattern.html
http://code.google.com/p/guava-libraries/wiki/UsingAndAvoidingNullExplained
http://www.sw-engineering-candies.com/blog-1/comparison-of-ways-to-check-preconditions-in-java
---------------------------
http://stackoverflow.com/questions/271526/avoiding-null-statements-in-java
http://robaustin.wikidot.com/annotations-and-notnull
http://java.dzone.com/articles/no-more-excuses-use-null
https://blogs.oracle.com/geertjan/entry/netbeans_ide_7_3_knows
http://functionaljava.googlecode.com/svn/artifacts/3.0/javadoc/fj/data/Option.html
http://thetechcandy.wordpress.com/2010/01/28/avoid-null/#comment-30
29 octubre 2013
24 octubre 2013
10 octubre 2013
#{ ARQ: Armando base para construir }
Me encuentro armando una base con la siguiente arquitectura que me "gusta" y luego de leer, estoy convencido que es lo mejor:
- Spring MVC
- MyBatis
- jQuery
Links:
- http://panyongzheng.iteye.com/blog/1811017
- http://www.technicalkeeda.com/bootstrap/twitter-bootstrap-with-spring-mvc
- https://github.com/hmkcode/Spring-Framework/blob/master/spring-mybatis/pom.xml
- https://github.com/priyatam/springmvc-twitterbootstrap-showcase
- http://hmkcode.com/mybatis-spring-junit-the-missing-part/
09 octubre 2013
Suscribirse a:
Entradas
(Atom)