Spring Tutorial

Fix Eclipse Failure To Transfer Antlr:antlr:jar:2.7.7 Cached In The Local Repository Error

I have some spring projects in my work space. And i use github to manage all the source code of different spring project. When i import those spring projects to a newly setup machine in eclipse, i find error message like Failure to transfer antlr:antlr:jar:2.7.7 from https://repo.maven.apache.org/maven2 was cached in the local repository. After some time …

Fix Eclipse Failure To Transfer Antlr:antlr:jar:2.7.7 Cached In The Local Repository Error Read More »

Archive For Required Library: ‘.m2/repository/spring-tx-5.0.10.release.jar’ In Project Cannot Be Read Or Is Not A Valid Zip File

When you develop a spring java project with maven, some times you may encounter errors like below. This is a crazy error because the reason is not very clear. I tried a lot of method such as rebuild the project, recreate the project and even delete .m2 directory to re-download all the maven jar files …

Archive For Required Library: ‘.m2/repository/spring-tx-5.0.10.release.jar’ In Project Cannot Be Read Or Is Not A Valid Zip File Read More »

How To Read External Properties File In Spring Using PropertyPlaceholderConfigurer

If you want to save configuration data in an external properties file, and then read them in spring application, you can use PropertyPlaceholderConfigurer class. This class has a location attribute where you can specify the external properties file location. It then can read the data from the external properties file, and you can use the …

How To Read External Properties File In Spring Using PropertyPlaceholderConfigurer Read More »

Spring MVC Request And Session Scoped Bean Example

Request and session scope are important web application concepts. Request scope is short-live scope, request scope object only exists in one http request. But session scope is long-live than request scope, session scope object exists between every request in a http session. Spring provides annotations for you to make a java bean exist in request …

Spring MVC Request And Session Scoped Bean Example Read More »