Java Question

can we use spring boot and spring mvc 4 together

a small functionality of my app, is developed in spring boot, where as rest is developed in spring mvc.
can i include the spring boot application as an external jar in my spring mvc application?
to be more precise, spring boot app is a filter, spring mvc is a regular hello world mvc.
i would like to use filter as external jar in spring mvc. however when i do so the app, runs as a spring boot and not as spring mvc. it thorws autowire exception in spring mvc application.

Answer Source

The easiest way to create your own Spring Boot-based project is to visit Spring Initializr, fill in your project details, pick your options, and then download either a Maven build file, or a bundled up project as a zip file.

Also here is an example of pom.xml file for Maven to start using Spring Boot:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""


        <relativePath/> <!-- lookup parent from repository -->



        <!-- then you can add any other Spring Boot dependencies -->