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 …
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 the java application. The biggest advantage of using the H2 database is that it can be packaged and distributed with java applications, which makes it very convenient to store …
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 is the same. This article …
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 …
Spring Expression Language Example $ vs #
SpEL is an abbreviation of Spring Expression Language which can be used to query property value from a properties file (Use $), or manipulate java objects and it’s attributes at runtime( Use #). Both of the two modifiers ($ or # ) can be used in the spring XML configuration files directly or can be …
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 Fix Duplicate Form Submission Use Redirect Url Example
When you submit a spring form, it will show a successful web result page in general. But when you refresh the form submit result page by clicking the browser refresh button. The browser will pop up a dialog telling you that the form data will be resubmitted again, this is always not what we want. …
Spring MVC Fix Duplicate Form Submission Use Redirect Url Example 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 »
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 the client. But before sending the data to the backend logic bean, it is better to validate the data value first, this can improve server …
Spring MVC Form Validation Example With Annotation Read More »