Spring REST API: How to disable HTTP Delete/Put methods

Question I had a student ask the question:How can I disable HTTP Options/Delete/Put methods? At the application level it should support only GET and POST requests. Other request methods like put/delete need to be blocked. I am using Spring Boot, Spring MVC and Rest services. Answer One possible solution is to make use of Spring Interceptors. Spring Interceptors can intercept [...]

By |2020-01-06T14:14:38-05:00January 6, 2020|How-To, Spring|Comments Off on Spring REST API: How to disable HTTP Delete/Put methods

How to Unit Test Spring Apps

Are you building Spring apps?   Have you struggled with the task of how to unit test your Spring app?   Well, here are some free tutorials to help get you started.   Unit Testing Spring Core https://examples.javacodegeeks.com/core-java/junit/spring-junit-test-example/     Unit Testing of Spring MVC Controllers: “Normal” Controllers https://www.petrikainulainen.net/programming/spring-framework/unit-testing-of-spring-mvc-controllers-normal-controllers/     Unit Testing of Spring MVC Controllers: Configuration https://www.petrikainulainen.net/programming/spring-framework/unit-testing-of-spring-mvc-controllers-configuration/  

By |2018-05-18T10:27:38-04:00May 18, 2018|Spring|Comments Off on How to Unit Test Spring Apps

Spring and Hibernate Interview Questions

Here's a list of questions to help you prepare for a Spring and Hibernate interview. Spring MVC Interview Questions https://howtodoinjava.com/interview-questions/spring-mvc-interview-questions-with-answers/   Spring AOP Interview Questions https://www.dineshonjava.com/spring-aop-interview-questions-and-answers/   Spring REST Interview Questions https://www.dineshonjava.com/spring-rest-web-services-interview-questions-and-answers/   Spring Boot Interview Questions https://www.journaldev.com/8611/spring-boot-interview-questions   Hibernate Interview Questions https://www.journaldev.com/3633/hibernate-interview-questions-and-answers --- If you need to brush up on core Java, JSP and JDBC topics, see my post [...]

By |2018-04-03T10:13:37-04:00April 3, 2018|Hibernate, Java, Spring|Comments Off on Spring and Hibernate Interview Questions

My Bookshelf: SOA, Spring, Hibernate, GWT, TDD/JUnit, Agile, Scrum, Continuous Integration

Here's a snapshot of my bookshelf. Just a snippet of a much larger library. Nice collection of books on SOA, Spring, Hibernate, GWT, TDD/JUnit, Agile, Scrum, Continuous Integration [nggallery id=1 template=caption]

By |2012-07-01T16:46:41-04:00July 1, 2012|Agile, GWT, Java, Maven, Passion, Scrum, SOA, Software Project Management, Spring, Test Driven Development, XP|Comments Off on My Bookshelf: SOA, Spring, Hibernate, GWT, TDD/JUnit, Agile, Scrum, Continuous Integration

Add Social Networking to your Java App

Social networking is all the rage. Now you can easily add social networking to your Java application with the Spring Social framework. Spring Social is an extension of the Spring Framework that allows you to connect your applications with Software-as-a-Service (SaaS) providers such as Facebook and Twitter. Key Features An extensible service provider framework that greatly simplifies the process of [...]

By |2012-04-15T08:10:59-04:00April 15, 2012|Java, Spring|Comments Off on Add Social Networking to your Java App

Calling Stored Procedures with Spring JDBC Templates

In this article, you learn how to call stored procedures using the Spring JDBC Templates API. Stored procedures are commonly used to encapsulate complex SQL queries. Application developers can leverage the functionality of stored procedures with the Spring JDBC Templates API. In this example, we have a stored procedure named: getCars. This stored procedure will search for cars based on [...]

By |2011-11-10T13:49:27-05:00November 10, 2011|How-To, Java, JDBC, Spring|27 Comments
Go to Top