10
respostas

Deploy no Heroku

Olá pessoal!

Gostaria de saber se com spring boot, a maneira de fazer o deploy no heroku é a mesma que foi abordada no curso!

Tenho uma WebApp com Spring boot, thymeleaf e com banco Mysql

Obrigado desde já

10 respostas

Iran tudo bem ?

É da mesma forma, ele vai identificar seu projeto como Spring Boot e já vai subir.

Se tiver qualquer problema pode falar.

Abraços

Iran tudo bem ?

É da mesma forma, ele vai identificar seu projeto como Spring Boot e já vai subir.

Se tiver qualquer problema pode falar.

Abraços

Olá Matheus tudo bom?

fiz conforme e tive como retorno o seguinte log!

pode me dar uma luz.

desde já, Agradeço

2017-06-26T04:18:45.540305+00:00 app[web.1]: INFO: Starting Servlet Engine: Apache Tomcat/7.0.57
2017-06-26T04:18:45.840833+00:00 app[web.1]: Jun 26, 2017 4:18:45 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
2017-06-26T04:18:45.842400+00:00 app[web.1]: Jun 26, 2017 4:18:45 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
2017-06-26T04:18:45.840860+00:00 app[web.1]: INFO: validateJarFile(/app/target/tomcat.34301/work/Tomcat/localhost/_/WEB-INF/lib/tomcat-embed-core-8.5.14.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
2017-06-26T04:18:45.842401+00:00 app[web.1]: INFO: validateJarFile(/app/target/tomcat.34301/work/Tomcat/localhost/_/WEB-INF/lib/tomcat-embed-el-8.5.14.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
2017-06-26T04:18:45.861455+00:00 app[web.1]: Jun 26, 2017 4:18:45 AM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
2017-06-26T04:18:45.861458+00:00 app[web.1]: INFO: No global web.xml found
2017-06-26T04:18:46.725813+00:00 heroku[web.1]: State changed from starting to up
2017-06-26T04:18:46.736684+00:00 app[web.1]: WARNING: Unknown version string [3.1]. Default version will be used.
2017-06-26T04:18:46.736667+00:00 app[web.1]: Jun 26, 2017 4:18:46 AM org.apache.catalina.deploy.WebXml setVersion
2017-06-26T04:18:52.330934+00:00 app[web.1]: Jun 26, 2017 4:18:52 AM org.apache.catalina.core.ApplicationContext log
2017-06-26T04:18:52.330950+00:00 app[web.1]: INFO: 3 Spring WebApplicationInitializers detected on classpath
2017-06-26T04:18:52.358350+00:00 app[web.1]: 04:18:52.355 [localhost-startStop-1] DEBUG br.com.agroallium.config.ServletSpringMvc - No ContextLoaderListener registered, as createRootApplicationContext() did not return an application context
2017-06-26T04:18:52.405557+00:00 app[web.1]: 04:18:52.405 [localhost-startStop-1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [servletConfigInitParams] PropertySource with lowest search precedence
2017-06-26T04:18:52.405612+00:00 app[web.1]: 04:18:52.405 [localhost-startStop-1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [servletContextInitParams] PropertySource with lowest search precedence
2017-06-26T04:18:52.409188+00:00 app[web.1]: 04:18:52.409 [localhost-startStop-1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
2017-06-26T04:18:52.409381+00:00 app[web.1]: 04:18:52.409 [localhost-startStop-1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
2017-06-26T04:18:52.411470+00:00 app[web.1]: 04:18:52.411 [localhost-startStop-1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [servletContextInitParams] PropertySource with lowest search precedence
2017-06-26T04:18:52.409566+00:00 app[web.1]: 04:18:52.409 [localhost-startStop-1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Initialized StandardServletEnvironment with PropertySources [servletConfigInitParams,servletContextInitParams,systemProperties,systemEnvironment]
2017-06-26T04:18:52.411397+00:00 app[web.1]: 04:18:52.411 [localhost-startStop-1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [servletConfigInitParams] PropertySource with lowest search precedence
2017-06-26T04:18:52.411592+00:00 app[web.1]: 04:18:52.411 [localhost-startStop-1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
2017-06-26T04:18:52.411703+00:00 app[web.1]: 04:18:52.411 [localhost-startStop-1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
2017-06-26T04:18:52.411811+00:00 app[web.1]: 04:18:52.411 [localhost-startStop-1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Initialized StandardServletEnvironment with PropertySources [servletConfigInitParams,servletContextInitParams,systemProperties,systemEnvironment]
2017-06-26T04:18:52.422290+00:00 app[web.1]: Jun 26, 2017 4:18:52 AM org.apache.catalina.core.ContainerBase startInternal
2017-06-26T04:18:52.422292+00:00 app[web.1]: SEVERE: A child container failed during start
2017-06-26T04:18:52.422304+00:00 app[web.1]: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
2017-06-26T04:18:52.422306+00:00 app[web.1]:     at java.util.concurrent.FutureTask.get(FutureTask.java:192)
2017-06-26T04:18:52.422305+00:00 app[web.1]:     at java.util.concurrent.FutureTask.report(FutureTask.java:122)
2017-06-26T04:18:52.422307+00:00 app[web.1]:     at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
2017-06-26T04:18:52.422308+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2017-06-26T04:18:52.422308+00:00 app[web.1]:     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
2017-06-26T04:18:52.422307+00:00 app[web.1]:     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
2017-06-26T04:18:52.422309+00:00 app[web.1]:     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
2017-06-26T04:18:52.422309+00:00 app[web.1]:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2017-06-26T04:18:52.422310+00:00 app[web.1]:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2017-06-26T04:18:52.422310+00:00 app[web.1]:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2017-06-26T04:18:52.422311+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
2017-06-26T04:18:52.422312+00:00 app[web.1]:     ... 6 more
2017-06-26T04:18:52.422311+00:00 app[web.1]:     at java.lang.Thread.run(Thread.java:745)
2017-06-26T04:18:52.422313+00:00 app[web.1]: Caused by: java.lang.NoSuchMethodError: org.apache.tomcat.util.res.StringManager.getManager(Ljava/lang/Class;)Lorg/apache/tomcat/util/res/StringManager;
2017-06-26T04:18:52.422313+00:00 app[web.1]:     at org.apache.tomcat.websocket.WsWebSocketContainer.<clinit>(WsWebSocketContainer.java:78)
2017-06-26T04:18:52.422312+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
2017-06-26T04:18:52.422314+00:00 app[web.1]:     at org.apache.tomcat.websocket.server.WsSci.init(WsSci.java:131)
2017-06-26T04:18:52.422314+00:00 app[web.1]:     at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:47)
2017-06-26T04:18:52.422315+00:00 app[web.1]:     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5481)
2017-06-26T04:18:52.422315+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2017-06-26T04:18:52.422316+00:00 app[web.1]: 
2017-06-26T04:18:52.423372+00:00 app[web.1]: SEVERE: A child container failed during start
2017-06-26T04:18:52.423373+00:00 app[web.1]: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
2017-06-26T04:18:52.423374+00:00 app[web.1]:     at java.util.concurrent.FutureTask.report(FutureTask.java:122)
2017-06-26T04:18:52.423374+00:00 app[web.1]:     at java.util.concurrent.FutureTask.get(FutureTask.java:192)
2017-06-26T04:18:52.422315+00:00 app[web.1]:     ... 6 more
2017-06-26T04:18:52.423371+00:00 app[web.1]: Jun 26, 2017 4:18:52 AM org.apache.catalina.core.ContainerBase startInternal
2017-06-26T04:18:52.423375+00:00 app[web.1]:     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
2017-06-26T04:18:52.423375+00:00 app[web.1]:     at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
2017-06-26T04:18:52.423376+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2017-06-26T04:18:52.423377+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2017-06-26T04:18:52.423378+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2017-06-26T04:18:52.423379+00:00 app[web.1]:     at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341)
2017-06-26T04:18:52.423380+00:00 app[web.1]:     at webapp.runner.launch.Main.main(Main.java:222)
2017-06-26T04:18:52.423377+00:00 app[web.1]:     at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
2017-06-26T04:18:52.423378+00:00 app[web.1]:     at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
2017-06-26T04:18:52.423380+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
2017-06-26T04:18:52.423381+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
2017-06-26T04:18:52.423382+00:00 app[web.1]:     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
2017-06-26T04:18:52.423382+00:00 app[web.1]:     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
2017-06-26T04:18:52.423384+00:00 app[web.1]:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2017-06-26T04:18:52.423385+00:00 app[web.1]:     at java.lang.Thread.run(Thread.java:745)
2017-06-26T04:18:52.423385+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: A child container failed during start
2017-06-26T04:18:52.423386+00:00 app[web.1]:     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
2017-06-26T04:18:52.423383+00:00 app[web.1]:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2017-06-26T04:18:52.423387+00:00 app[web.1]:     at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
2017-06-26T04:18:52.423388+00:00 app[web.1]:     ... 6 more
2017-06-26T04:18:52.423387+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2017-06-26T04:18:52.423384+00:00 app[web.1]:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2017-06-26T04:18:52.423389+00:00 app[web.1]: 
2017-06-26T04:18:52.423858+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
2017-06-26T04:18:52.423919+00:00 app[web.1]:     at webapp.runner.launch.Main.main(Main.java:222)
2017-06-26T04:18:52.423990+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]]
2017-06-26T04:18:52.423755+00:00 app[web.1]: Exception in thread "main" org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]
2017-06-26T04:18:52.424029+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
2017-06-26T04:18:52.424068+00:00 app[web.1]:     at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
2017-06-26T04:18:52.424104+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2017-06-26T04:18:52.423908+00:00 app[web.1]:     at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341)
2017-06-26T04:18:52.424139+00:00 app[web.1]:     ... 2 more
2017-06-26T04:18:52.424233+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]]
2017-06-26T04:18:52.424310+00:00 app[web.1]:     at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
2017-06-26T04:18:52.424272+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
2017-06-26T04:18:52.424423+00:00 app[web.1]:     ... 4 more
2017-06-26T04:18:52.424498+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: A child container failed during start
2017-06-26T04:18:52.424370+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2017-06-26T04:18:52.424537+00:00 app[web.1]:     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
2017-06-26T04:18:52.424575+00:00 app[web.1]:     at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
2017-06-26T04:18:52.424613+00:00 app[web.1]:     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2017-06-26T04:18:52.424646+00:00 app[web.1]:     ... 6 more

Iran, tudo bem ?

Cara você precisa criar um arquivo chamado Procfile que vai ter a configuração de como vai executar seu programa.

Eu tenho uma aplicação no heroku e ela roda da seguinte forma no Procfile :

web: java -Dspring.profiles.active=heroku $JAVA_OPTS -jar target/*.jar

Acho que deve ajudar.

Estou trocando o profile para heroku, já que em dev é outro properties

Olá Matheus, estou fazendo da mesma forma que é feita no curso, meu arquivo Procfile está assim:

web: java $JAVA_OPTS -jar -Dspring.profiles.active=prod target/dependency/webapp-runner.jar --port $PORT target/*.war

Seu arquivo procfile está onde ?

esta no diretório raiz da app

Por algum motivo ele está identificando seu projeto como um projeto web, por esse motivo não está conseguindo subir, pelo que entendi lendo sua exception.

Matheus, por favor, dê uma olhada no meu código, e vê se você consegue observar algum erro... estou colocando os codigos de configurações, datasources, etc.. , pom.xml, Procfile.

Agradeço imensamente

package br.com.agroallium.config;

import java.util.Properties;

import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.Database;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Configuration
@EnableJpaRepositories(basePackages = "br.com.agroallium.repository")
@EnableTransactionManagement
@PropertySource("classpath:/application.properties")
public class SpringDataConfig {

    @Bean
    public JpaVendorAdapter jpaVendorAdapter() {
        HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter();
        adapter.setDatabase(Database.MYSQL);
        adapter.setShowSql(true);
        adapter.setGenerateDdl(true);
        adapter.setDatabasePlatform("org.hibernate.dialect.MySQLDialect");

        return adapter;
    }

    @Bean
    public EntityManagerFactory entityManagerFactory(DataSource dataSource, Properties adProperties,
            JpaVendorAdapter jpaVendorAdapter) {
        LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
        factory.setDataSource(dataSource);
        factory.setJpaVendorAdapter(jpaVendorAdapter);
        factory.setPackagesToScan("br.com.agroallium.models");
        factory.setMappingResources("sql/consultas-nativas.xml");
        factory.afterPropertiesSet();
        factory.setJpaProperties(adProperties);

        return factory.getObject();
    }

    @Bean
    public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
        JpaTransactionManager transactionManager = new JpaTransactionManager();
        transactionManager.setEntityManagerFactory(entityManagerFactory);

        return transactionManager;
    }

}
package br.com.agroallium.config;

import java.net.URI;
import java.net.URISyntaxException;
import java.util.Properties;

import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Profile;
import org.springframework.core.env.Environment;
import org.springframework.jdbc.datasource.DriverManagerDataSource;

@Profile("prod")
public class SpringDataProductionConfig {

    @Autowired
    private Environment environment;

    @Bean
    public Properties additionalProperties() {
        Properties props = new Properties();
        props.setProperty("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect");
        props.setProperty("hibernate.show_sql", "true");
        props.setProperty("hibernate.hbm2ddl.auto", "update");
        return props;
    }

    @Bean
    public DataSource dataSource() throws URISyntaxException {
        DriverManagerDataSource dataSource = new DriverManagerDataSource();
        dataSource.setDriverClassName("org.postgresql.Driver");
        // usuario:senha@host:port/path
        URI dbUrl = new URI(environment.getProperty("DATABASE_URL"));

        dataSource.setUrl("jdbc:postgresql://" + dbUrl.getHost() + ":" + dbUrl.getPort() + dbUrl.getPath());
        dataSource.setUsername(dbUrl.getUserInfo().split(":")[0]);
        dataSource.setPassword(dbUrl.getUserInfo().split(":")[1]);

        return dataSource;
    }

}
<?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>br.com.agroallium</groupId>
    <artifactId>AgroAllium</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>AgroAllium</name>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.3.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </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-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</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-validation</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
        </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/org.thymeleaf.extras/thymeleaf-extras-springsecurity4 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>


        <!-- https://mvnrepository.com/artifact/org.thymeleaf.extras/thymeleaf-extras-springsecurity4 -->
        <dependency>
            <groupId>org.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-springsecurity4</artifactId>
        </dependency>

        <dependency>
            <groupId>com.github.mxab.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-data-attribute</artifactId>
        </dependency>
        <dependency>
            <groupId>org.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-springsecurity4</artifactId>
        </dependency>

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency>

    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>

                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>

                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.github.jsimone</groupId>
                                    <artifactId>webapp-runner</artifactId>
                                    <version>7.0.57.2</version>
                                    <destFileName>
                                        webapp-runner.jar
                                    </destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
web:  java $JAVA_OPTS -jar -Dspring.profiles.active=prod target/dependency/webapp-runner.jar --port $PORT target/*.war

Fala Iran, tudo bem ?

Eu acho que o problema é que o projeto está sendo 'empacotado' como war. E mesmo com o web app runner provavelmente o heroku está tentando fazer essa aplicação rodar dentro de um servlet container tradicional. Nos logs mostra o erro de lifecycle do tomcat, não aparece o log de inicialização da app Spring Boot, etc.

Tente colocar o packaging como jar. E no seu procfile especificar o comando pra rodar esse jar. O Spring Boot roda com servlet container interno (embedded). Ele mesmo se encarrega de subir na porta e etc.

web:  java $JAVA_OPTS -Dserver.port=$PORT -Dspring.profiles.active=prod -jar target/*.jar

Tem que passar a prop server.port e passar a variavel do heroku ja que ele te da a porta certa a partir dela. Tenho uma app spring boot no heroku com um procfile simples assim, rodando o proprio jar normalmente.

Uma dica, antes de tentar fazer o deploy tente rodar na sua própria máquina o comando (ai sem o server.port $JAVA_OPTS etc). Mas é uma boa validar localmente se a app está subindo e depois tentar no heroku.

mvn clean package && java -Dspring.profiles.active=seuProfileDeDev -jar target/*.jar

Dê uma olhada nisso.

Espero ter ajudado. Abraço!