CSRF (also known as XSRF) is a well known web security attack allowing hackers to steel your identity and perform requests on website where your are already logged into. This tutorial shows how to Angular...
Tagged: spring
Angular download file with Spring Boot
This tutorial shows a step by step solution to Angular download file Spring Boot backend. We will cover the download of files located in system and others in classpath. Server side This section covers...
Optional Spring @value
Spring provides the powerful annotation @value to set a default value expression for a field or method/constructor parameter. @value is mainly used to inject a property value from the applications.properties file into a Spring bean. This tutorial...
Install Spring IDE on Eclipse
Spring IDE is a set of plugins which are adding support for the popular application framework Spring to the Eclipse platform. This tutorial shows how to install Spring IDE on Eclipse. Installation Install STS...
Defining a proxy in Spring RestTemplate
By default, RestTemplate don’t use a proxy to make the http calls and if you work in an environment that requires one, you will encounter the following exception :
1 2 3 4 5 6 7 8 |
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://roufid.com": Connection timed out: connect; nested exception is java.net.ConnectException: Connection timed out: connect at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:633) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:588) at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:295) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) ... 33 more |
This tutorial will show two...
Find Spring JPA repository domain type
In a Spring Data JPA environment, you may want to retrieve the domain type of the repositories defined in your application. This tutorial will show two ways to retrieve Spring JPA repository domain type....
Spring Boot hello world tutorial
Spring Boot is one of the most powerful Java EE frameworks that aims to facilitate the development of new application. It brings all the power of the Spring stack (Spring dependency injection, Spring data...
Load multiple configuration files from different directories with Spring Boot
This tutorial will show how to load multiple configuration files from different directories with Spring Boot. By default, Spring Boot look for your externalized configuration file ( application.proroperties ) in four predetermined locations : in classpath...
Spring Boot multiple databases configuration
By simple configuration, Spring boot provides a powerful way to work with a single database. Sometimes you need to work with multiple databases (for example, one for basic usage and another for archiving). In...