My projects works great in eclipse, but when creating a jar and installing it works and I can open my web page but doing some queries it doesnt, but this only happens in my jar not in eclipse so I guess the problem has to do something with dependencies. The thing is that I have tried everything on stack. tried this following solutions:
Failed to process import candidates for configuration class
How can I create an executable JAR with dependencies using Maven?
How to make a “fat jar” of a Maven project? [duplicate]
But its always the same some queries wont execute. I dont really know what im doing wrong here, now I went back to where I started and my POM looks like:
<?xml version="1.0" encoding="UTF-8"?>
<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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>demo</name>
    <description>Demo project for Spring Boot</description>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.4.2.RELEASE</version>
    </parent>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/net.sourceforge.nekohtml/nekohtml -->
        <dependency>
            <groupId>net.sourceforge.nekohtml</groupId>
            <artifactId>nekohtml</artifactId>
            <version>1.9.21</version><!--$NO-MVN-MAN-VER$-->
        </dependency>
        <dependency>
            <groupId>org.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-springsecurity4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.3.2</version>
        </dependency>     
    </dependencies>
    <build>
        <plugins>
    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
            <fork>true</fork>
            <mainClass>com.example.DemoApplication</mainClass>
        </configuration>
        <executions>
              <execution>
                <goals>
                  <goal>repackage</goal>
                </goals>
              </execution>
            </executions>
    </plugin>
</plugins>
    </build>
</project>
"EDIT:this is my properties file"
# ===============================
# = Conexion con la base de datos
# ===============================
spring.datasource.url=jdbc:mysql://*****/vudaspring?useSSL=false
spring.datasource.username=*******
spring.datasource.password =********
spring.datasource.testWhileIdle=true
spring.datasource.validationQuery=SELECT 1
# ===============================
# = JPA / HIBERNATE
# ===============================
spring.jpa.show-sql = true
spring.jpa.hibernate.ddl-auto = update
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
# ===============================
# = Thymeleaf configuracion
# ===============================
spring.thymeleaf.mode=LEGACYHTML5
spring.thymeleaf.cache=false
# ===============================
# = Multipart Files
# ===============================
spring.http.multipart.max-file-size=10MB
spring.http.multipart.max-request-size=10MB
# ==============================================================
# = Spring Security / Authentication Queries 
# ==============================================================
spring.queries.users-query=select email, password, active from user where email=?
spring.queries.roles-query=select u.email, r.role from user u inner join user_role ur on(u.user_id=ur.user_id) inner join role r on(ur.role_id=r.role_id) where u.email=?
spring.queries.pais-query=SELECT * FROM pais
spring.queries.tipousuario-query=SELECT * FROM tipoUsuario
# ==============================================================
# = Propiedades del Email
# ==============================================================
spring.mail.host= smtp.gmail.com
spring.mail.username= ventanillaunicada@gmail.com
spring.mail.password= *******
spring.mail.port= 587
spring.mail.properties.mail.smtp.starttls.enable = true
"EDIT:this is my WebMvcConfig"
package com.example.configuration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.web.ErrorAttributes;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import com.example.controller.VudaErrorController;
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
    @Autowired
    private ErrorAttributes errorAttributes;
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.
        addResourceHandler("/files/**")
        .addResourceLocations("file:../imagenes/");
    }
    @Bean
    public BCryptPasswordEncoder passwordEncoder() {
        BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
        return bCryptPasswordEncoder;
    }
    @Bean
    public VudaErrorController vudaErrorController() {return new VudaErrorController(errorAttributes);}
}
