title: Spring Boot unable to serve static image from resource folder
body: <p>In my Spring Boot application I have a following static file:</p>
  
  <pre><code>\src\main\resources\static\images\social\facebook\f_logo.jpg
  </code></pre>
  
  <p>This is my application.properties</p>
  
  <pre><code>server.port: 8080
  server.contextPath: /api
  </code></pre>
  
  <p>I'm trying to access this file by the following url:</p>
  
  <p><a href="http://localhost:8080/api/images/social/facebook/f_logo.jpg" rel="noreferrer">http://localhost:8080/api/images/social/facebook/f_logo.jpg</a></p>
  
  <p>but the server returns <code>404 Not Found.</code></p>
  
  <p>What am I doing wrong and how to fix it ?</p>
  
  <p><strong>UPDATED</strong></p>
  
  <p>My pom files:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.example&lt;/groupId&gt;
      &lt;artifactId&gt;example&lt;/artifactId&gt;
      &lt;version&gt;0.0.1&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;name&gt;example&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;jackson.version&gt;2.8.0&lt;/jackson.version&gt;
          &lt;spring.version&gt;4.3.5.RELEASE&lt;/spring.version&gt;
          &lt;spring.boot.version&gt;1.4.3.RELEASE&lt;/spring.boot.version&gt;
          &lt;cdi-api.version&gt;2.0-EDR1&lt;/cdi-api.version&gt;
          &lt;slf4j.version&gt;1.7.18&lt;/slf4j.version&gt;
          &lt;logback.version&gt;1.1.6&lt;/logback.version&gt;
          &lt;junit.version&gt;4.12&lt;/junit.version&gt;
          &lt;log4j.version&gt;1.2.17&lt;/log4j.version&gt;
          &lt;commons-lang3.version&gt;3.4&lt;/commons-lang3.version&gt;
          &lt;commons-validator.version&gt;1.5.0&lt;/commons-validator.version&gt;
          &lt;commons-io.version&gt;2.4&lt;/commons-io.version&gt;
  
          &lt;jacoco-maven-plugin.version&gt;0.7.4.201502262128&lt;/jacoco-maven-plugin.version&gt;
          &lt;maven-surefire-plugin.version&gt;2.19&lt;/maven-surefire-plugin.version&gt;
          &lt;lifecycle-mapping.version&gt;1.0.0&lt;/lifecycle-mapping.version&gt;
  
          &lt;java.source.version&gt;1.8&lt;/java.source.version&gt;
          &lt;java.target.version&gt;1.8&lt;/java.target.version&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-milestones&lt;/id&gt;
              &lt;name&gt;Spring Milestones&lt;/name&gt;
              &lt;url&gt;http://repo.spring.io/milestone&lt;/url&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;false&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;neo4j-release-repository&lt;/id&gt;
              &lt;name&gt;Neo4j Maven 2 release repository&lt;/name&gt;
              &lt;url&gt;http://m2.neo4j.org/content/repositories/releases&lt;/url&gt;
              &lt;releases&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/releases&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;false&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-libs-milestone&lt;/id&gt;
              &lt;name&gt;Spring Milestones&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/libs-milestone&lt;/url&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;false&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.jacoco&lt;/groupId&gt;
                  &lt;artifactId&gt;jacoco-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${jacoco-maven-plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;excludes&gt;
                      &lt;/excludes&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;jacoco-initialize&lt;/id&gt;
                          &lt;phase&gt;initialize&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;prepare-agent&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;propertyName&gt;jacoco.agent.argLine&lt;/propertyName&gt;
                              &lt;destFile&gt;${jaCoCoExecutionDataFile}&lt;/destFile&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;jacoco-report&lt;/id&gt;
                          &lt;phase&gt;test&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;report&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${maven-surefire-plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;argLine&gt;${jacoco.agent.argLine}&lt;/argLine&gt;
                      &lt;argLine&gt;-Dfile.encoding=UTF-8&lt;/argLine&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;!--This plugin's configuration is used to store Eclipse m2e settings 
                      only. It has no influence on the Maven build itself. --&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                      &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                      &lt;version&gt;${lifecycle-mapping.version}&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;lifecycleMappingMetadata&gt;
                              &lt;pluginExecutions&gt;
                                  &lt;pluginExecution&gt;
                                      &lt;pluginExecutionFilter&gt;
                                          &lt;groupId&gt;org.jacoco&lt;/groupId&gt;
                                          &lt;artifactId&gt;
                                              jacoco-maven-plugin
                                          &lt;/artifactId&gt;
                                          &lt;versionRange&gt;
                                              [${jacoco-maven-plugin.version},)
                                          &lt;/versionRange&gt;
                                          &lt;goals&gt;
                                              &lt;goal&gt;prepare-agent&lt;/goal&gt;
                                          &lt;/goals&gt;
                                      &lt;/pluginExecutionFilter&gt;
                                      &lt;action&gt;
                                          &lt;ignore /&gt;
                                      &lt;/action&gt;
                                  &lt;/pluginExecution&gt;
                              &lt;/pluginExecutions&gt;
                          &lt;/lifecycleMappingMetadata&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
  
          &lt;!-- Jackson --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
              &lt;version&gt;${jackson.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-annotations&lt;/artifactId&gt;
              &lt;version&gt;${jackson.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
              &lt;version&gt;${jackson.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-aspects&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-expression&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring boot --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-autoconfigure&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-logging&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
              &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
              &lt;version&gt;${cdi-api.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.transaction&lt;/groupId&gt;
              &lt;artifactId&gt;jta&lt;/artifactId&gt;
              &lt;version&gt;1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;${commons-lang3.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-validator&lt;/groupId&gt;
              &lt;artifactId&gt;commons-validator&lt;/artifactId&gt;
              &lt;version&gt;${commons-validator.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;${commons-io.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Logging --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;${slf4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
              &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
              &lt;version&gt;${logback.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- jUnit --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;${junit.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;modules&gt;
          &lt;module&gt;domain&lt;/module&gt;
          &lt;module&gt;api&lt;/module&gt;
          &lt;module&gt;ui&lt;/module&gt;
      &lt;/modules&gt;
  &lt;/project&gt;
  
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  
      &lt;parent&gt;
          &lt;artifactId&gt;example&lt;/artifactId&gt;
          &lt;groupId&gt;com.example&lt;/groupId&gt;
          &lt;version&gt;0.0.1&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;domain&lt;/artifactId&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
  
          &lt;neo4j.version&gt;3.1.0&lt;/neo4j.version&gt;
          &lt;lucene.version&gt;5.5.0&lt;/lucene.version&gt;
          &lt;spring-data-neo4j.version&gt;4.2.0.BUILD-SNAPSHOT&lt;/spring-data-neo4j.version&gt;
          &lt;neo4j-ogm.version&gt;2.1.1-SNAPSHOT&lt;/neo4j-ogm.version&gt;
          &lt;spring-social-security.version&gt;1.1.4.RELEASE&lt;/spring-social-security.version&gt;
          &lt;spring-security-oauth2.version&gt;2.0.11.RELEASE&lt;/spring-security-oauth2.version&gt;
          &lt;hibernate-validator.version&gt;5.2.4.Final&lt;/hibernate-validator.version&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-snapshots&lt;/id&gt;
              &lt;name&gt;Spring Snapshots&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/libs-snapshot&lt;/url&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;neo4j-snapshot-repository&lt;/id&gt;
              &lt;name&gt;Neo4j Maven 2 snapshot repository&lt;/name&gt;
              &lt;url&gt;http://m2.neo4j.org/content/repositories/snapshots&lt;/url&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/snapshots&gt;
              &lt;releases&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/releases&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.5.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java.source.version}&lt;/source&gt;
                      &lt;target&gt;${java.target.version}&lt;/target&gt;
                      &lt;encoding&gt;${project.build.sourceEncoding}&lt;/encoding&gt;
                      &lt;optimize&gt;true&lt;/optimize&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.6&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;${project.build.sourceEncoding}&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
  
          &lt;!-- neo4j --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j-ogm-core&lt;/artifactId&gt;
              &lt;version&gt;${neo4j-ogm.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j-ogm-http-driver&lt;/artifactId&gt;
              &lt;version&gt;${neo4j-ogm.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j-ogm-embedded-driver&lt;/artifactId&gt;
              &lt;version&gt;${neo4j-ogm.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j-ogm-bolt-driver&lt;/artifactId&gt;
              &lt;version&gt;${neo4j-ogm.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j-enterprise&lt;/artifactId&gt;
              &lt;version&gt;${neo4j.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
                      &lt;artifactId&gt;neo4j-security-enterprise&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j&lt;/artifactId&gt;
              &lt;version&gt;${neo4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
              &lt;artifactId&gt;spring-data-neo4j&lt;/artifactId&gt;
              &lt;version&gt;${spring-data-neo4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
              &lt;version&gt;4.1.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.social&lt;/groupId&gt;
              &lt;artifactId&gt;spring-social-security&lt;/artifactId&gt;
              &lt;version&gt;${spring-social-security.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security.oauth&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-oauth2&lt;/artifactId&gt;
              &lt;version&gt;${spring-security-oauth2.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;!-- Lucene --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.lucene&lt;/groupId&gt;
              &lt;artifactId&gt;lucene-core&lt;/artifactId&gt;
              &lt;version&gt;5.5.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
              &lt;version&gt;${hibernate-validator.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-social-twitter&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
              &lt;artifactId&gt;guava&lt;/artifactId&gt;
              &lt;version&gt;19.0-rc1&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  
  &lt;?xml version="1.0"?&gt;
  &lt;project
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
      xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  
      &lt;parent&gt;
          &lt;artifactId&gt;example&lt;/artifactId&gt;
          &lt;groupId&gt;com.example&lt;/groupId&gt;
          &lt;version&gt;0.0.1&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;api&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;properties&gt;
          &lt;!-- example --&gt;
          &lt;com.example.domain.version&gt;0.0.1&lt;/com.example.domain.version&gt;
          &lt;!-- 3rd party --&gt;
          &lt;spring-security-core.version&gt;4.1.3.RELEASE&lt;/spring-security-core.version&gt;
          &lt;spring.social.google.version&gt;1.0.0.RELEASE&lt;/spring.social.google.version&gt;
          &lt;spring-social-github.version&gt;1.0.0.M4&lt;/spring-social-github.version&gt;
          &lt;javax.servlet-api.version&gt;3.1.0&lt;/javax.servlet-api.version&gt;
          &lt;javaee-web-api.version&gt;7.0&lt;/javaee-web-api.version&gt;
          &lt;json-path.version&gt;2.0.0&lt;/json-path.version&gt;
          &lt;rest-assured.version&gt;2.8.0&lt;/rest-assured.version&gt;
          &lt;httpclient&gt;4.5.2&lt;/httpclient&gt;
          &lt;springfox-swagger2.version&gt;2.6.0&lt;/springfox-swagger2.version&gt;
          &lt;gson.version&gt;2.6.2&lt;/gson.version&gt;
          &lt;maven-compiler-plugin.version&gt;3.3&lt;/maven-compiler-plugin.version&gt;
          &lt;maven-war-plugin.version&gt;2.6&lt;/maven-war-plugin.version&gt;
          &lt;java.source.version&gt;1.8&lt;/java.source.version&gt;
          &lt;java.target.version&gt;1.8&lt;/java.target.version&gt;
      &lt;/properties&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;local&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;prod&lt;/id&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;dependencies&gt;
          &lt;!-- example --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.example&lt;/groupId&gt;
              &lt;artifactId&gt;domain&lt;/artifactId&gt;
              &lt;version&gt;${com.example.domain.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
              &lt;version&gt;${spring-security-core.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
              &lt;version&gt;4.1.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-jwt&lt;/artifactId&gt;
              &lt;version&gt;1.0.5.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring Boot --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring Boot Social Providers --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-social-facebook&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-social-linkedin&lt;/artifactId&gt;
              &lt;version&gt;${spring.boot.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring Social Providers --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.social&lt;/groupId&gt;
              &lt;artifactId&gt;spring-social-google&lt;/artifactId&gt;
              &lt;version&gt;${spring.social.google.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.social&lt;/groupId&gt;
              &lt;artifactId&gt;spring-social-github&lt;/artifactId&gt;
              &lt;version&gt;${spring-social-github.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.jsonpath&lt;/groupId&gt;
              &lt;artifactId&gt;json-path&lt;/artifactId&gt;
              &lt;version&gt;${json-path.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.jsonpath&lt;/groupId&gt;
              &lt;artifactId&gt;json-path-assert&lt;/artifactId&gt;
              &lt;version&gt;${json-path.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- default j2ee dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
              &lt;version&gt;${javax.servlet-api.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
              &lt;version&gt;${javaee-web-api.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
              &lt;version&gt;${httpclient}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Swagger2 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
              &lt;version&gt;${springfox-swagger2.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
              &lt;version&gt;${springfox-swagger2.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.restassured&lt;/groupId&gt;
              &lt;artifactId&gt;rest-assured&lt;/artifactId&gt;
              &lt;version&gt;${rest-assured.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;version&gt;${gson.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
              &lt;version&gt;2.2.12&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;filtering&gt;true&lt;/filtering&gt;
                  &lt;directory&gt;${project.basedir}/src/main/resources&lt;/directory&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
          &lt;testResources&gt;
              &lt;testResource&gt;
                  &lt;directory&gt;${project.basedir}/src/test/resources&lt;/directory&gt;
                  &lt;filtering&gt;true&lt;/filtering&gt;
              &lt;/testResource&gt;
          &lt;/testResources&gt;
  
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;addResources&gt;false&lt;/addResources&gt;
                      &lt;jvmArguments&gt;
                          -Xdebug
                          -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
                      &lt;/jvmArguments&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;version&gt;${maven-compiler-plugin.version}&lt;/version&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java.source.version}&lt;/source&gt;
                      &lt;target&gt;${java.target.version}&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${maven-war-plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;${project.build.sourceEncoding}&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>