Java Spring Restful APIs
This document nicely explains the benefits of using the ContentNegotiatingResolver approach v/s the HTTPMEssageConverter approach.
http://java.dzone.com/articles/rest-spring
Cosimo Galluzzi
The Bright Sessions

roma★
Game of Thrones Daily

tannertan36
noise dept.
TMBGareOK. The Official They Might Be Giants tumblr
Sade Olutola
Not today Justin
No title available
sheepfilms
$LAYYYTER

oozey mess
The Stonewall Inn
No title available

Game Changer & Make Some Noise

No title available

gracie abrams

Love Begins
occasionally subtle
seen from United States
seen from Colombia
seen from Philippines
seen from United States

seen from United States

seen from Türkiye

seen from United States

seen from United Kingdom
seen from United States
seen from Ecuador
seen from Malaysia
seen from Germany
seen from Malaysia
seen from Brazil

seen from United Kingdom

seen from Spain

seen from Germany

seen from Netherlands

seen from Netherlands

seen from Türkiye
@kunalagupta-blog
Java Spring Restful APIs
This document nicely explains the benefits of using the ContentNegotiatingResolver approach v/s the HTTPMEssageConverter approach.
http://java.dzone.com/articles/rest-spring
Dependency Injecton and Dependency Injection in Spring links
http://martinfowler.com/articles/injection.html
http://static.springsource.org/spring/docs/2.5.x/reference/beans.html
Cobertura + Maven + Jenkins
On a local box maven cobertura plugin can be run using cobertura:cobertura
Cobertura instruments the byte code so we should be very sure that it is not instrumenting the actual class files but creating its own set of class files and instrumenting that.
In pom.xml we can set the formats of the cobertura plugin in the reporting section.
Reports can be aggregated using jenkins interface plugin for cobertura.
Cygwin
cygcheck - Check the version
find . -name b/*.txt -
search the current directory recursively with text filenames starting with b.
find / -name foo 2>/dev/null
- search the current files and redirect all errors to null stream.
find / -type f -mtime -7 | xargs tar -rf weekly_incremental.tar
will find any regular files (i.e., not directories or other special files) with the criteria "-type f", and only those modified seven or fewer days ago ("-mtime -7"). Note the use of xargs, a handy utility that coverts a stream of input (in this case the output of find) into command line arguments for the supplied commandwill find any regular files (i.e., not directories or other special files) with the criteria "-type f", and only those modified seven or fewer days ago ("-mtime -7"). Note the use of xargs, a handy utility that coverts a stream of input (in this case the output of find) into command line arguments for the supplied command
JAVA threads
For example, in the following (broken) code fragment, assume that this.done is a non-vol- atile boolean field:
while (!this.done) Thread.sleep(1000);
The compiler is free to read the field this.done just once, and reuse the cached value in each execution of the loop. This would mean that the loop would never terminate, even if another thread changed the value of this.done.
What's the difference between JRE and JDK?
The "JDK" is the Java Development Kit. I.e., the JDK is bundle of software that you can use to develop Java based software. The "JRE" is the Java Runtime Environment. I.e., the JRE is an implementation of the Java Virtual Machine which actually executes Java programs.
Typically, each JDK contains one (or more) JRE's along with the various development tools like the Java source compilers, bundling and deployment tools, debuggers, development libraries, etc.
http://download.oracle.com/javase/6/docs/technotes/tools/windows/jdkfiles.html
http://javahowto.blogspot.com/2006/05/javahome-vs-javahome.html
MAC OSX tricks
MAC OSx is based on BSD unix. Terminal has bash shell by default however, MAC supports all the shells and can be changed in System Prefs->Accounts
srm - Secure file removal. Permanent deletion of fail with recovery impossible.
Normally when you trash the file its replaced by random data atleast 7 times before is permanently deleted. This is done to recover the file.
shift + cmd + any char represents all the places/folders you can go to
shift+cmd+g - Go to a specific folder
shift+cmd+h - opens home directory
opt + cmd + any char represents the functions
opt+cmd+d - hides and unhides the dock
cmd+w - closes the window
To find configuration of a machine.
/proc/cpuinfo
/proc/meminfo
Java Security
JAVA platform provides different providers for security which are exposed through a standard interface to hide the implementation specifics.
eg. MessageDigest md = MessageDigest.getInstance("MD5");
We can specify the provider that we intend to use. Below is the high level framework architecture
Public Key Infrastructure: The JAVA platform consists if key stores , certificate stores. Certificate stores for trusted as well as untrusted CA. LDAP certificate store.
keytool and jarsigner are the tools to create certificates