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 …
H2 Database Tutorial
H2 is an embedded database developed in Java, it is free from platform constraints. It is only a class library and can be embedded directly into java application. The biggest advantage of using H2 database is that it can be packaged and distributed with java applications, which makes it very convenient to store a small amount of …
How To Change STS Eclipse INI File On MacOS
Eclipse.ini file is the configuration file where you can edit eclipse tool startup settings, such as increase eclipse JVM heap size to let it use more memory. And spring tool suite is based on eclipse, but the configuration file is not eclipse.ini, it’s name is sts.ini. But the file content are same. This article will …
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 …
Spring Expression Language Example $ vs #
SpEL is abbreviation of Spring Expression Language which can be used to query property value from properties file (Use $), or manipulate java object and it’s attributes at runtime( Use #). Both of the two modifier ($ or # ) can be used in spring XML configuration file directly, or can be used in java …
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 Fix Duplicate Form Submission Use Redirect Url Example
When you submit a spring form, it will show a success web result page in general. But when you refresh the form submit result page by clicking the browser refresh button. The browser will popup a dialog tell you that the form data will be resubmit again, this is always not what we want. So …
Spring MVC Fix Duplicate Form Submission Use Redirect Url Example 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 »
Spring MVC Form Validation Example With Annotation
Spring MVC form can be used to submit user data to web server, then web server logic bean can process those data and return related jsp view page back to client. But before send the data to backend logic bean, it is better to validate the data value first, this can improve server code performance …
Spring MVC Form Validation Example With Annotation Read More »