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 workspace. And I use GitHub to manage all the source code of different spring projects. When I import those spring projects to a newly set up machine in eclipse, I find an 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 …

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, sometimes you may encounter errors like below. This is a crazy error because the reason is not very clear. I tried a lot of methods such as rebuild the project, recreate the project, and even delete the .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 the 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 …

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

Spring MVC Request And Session Scoped Bean Example

Request scope 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 an HTTP session. Spring provides annotations for you to make a java bean exist in …

Spring MVC Request And Session Scoped Bean Example Read More »