Commit 823a940f authored by RenanMontenegro3's avatar RenanMontenegro3

fix:"correção do jar + target"

parent 26d248a0
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>br.com.treinaweb</groupId>
<artifactId>twjobs</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>twjobs</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>21</java.version>
<modelmapper.version>3.0.0</modelmapper.version>
<jjwt.version>0.12.5</jjwt.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</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-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>${modelmapper.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>${jjwt.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>${jjwt.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>${jjwt.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
package br.com.treinaweb.twjobs;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
@Component
@PropertySource("classpath:application.properties")
public class Config {
@Value("${spring.datasource.driver-class-name}")
String dbDriverClassName;
@Value("${spring.jpa.database-platform}")
String dbPlatform;
@Value("${spring.datasource.url}")
String dbUrl;
@Value("${spring.datasource.username}")
String dbUsername;
@Value("${spring.datasource.password}")
String dbPassword;
@Value("${spring.servlet.multipart.max-file-size}")
String maxFileSize;
@Value("${spring.servlet.multipart.max-request-size}")
String maxRequestSize;
@Value("${spring.mail.host}")
String mailHost;
@Value("${spring.mail.port}")
String mailPort;
@Value("${spring.mail.username}")
String mailUsername;
@Value("${spring.mail.password}")
String mailPassword;
@Value("${spring.mail.properties.mail.smtp.auth}")
String mailSmtpAuth;
@Value("${spring.mail.properties.mail.smtp.starttls.enable}")
String mailStartTls;
@Value("${spring.jpa.show-sql}")
String jpaShowSql;
@Value("${spring.jpa.properties.hibernate.event.merge.entity_copy_observer}")
String jpaMergeEntityCopyObserver;
@Value("${spring.jpa.hibernate.ddl-auto}")
String jpaHibernateDdlAuto;
@Value("${spring.jpa.properties.hibernate.format_sql}")
String jpaFormatSql;
@Value("${spring.data.web.pageable.one-indexed-parameters}")
String pageableOneIndexedParameters;
@Value("${spring.data.web.pageable.default-page-size}")
String pageableDefaultPageSize;
@Value("${spring.data.web.pageable.max-page-size}")
String pageableMaxPageSize;
@Value("${jwt.access.secret}")
String jwtAccessSecret;
@Value("${jwt.access.expires-in}")
String jwtAccessExpiresIn;
@Value("${jwt.refresh.secret}")
String jwtRefreshSecret;
@Value("${jwt.refresh.expires-in}")
String jwtRefreshExpiresIn;
@Value("${contato.disco.raiz}")
String discoRaiz;
@Value("${contato.disco.diretorio-fotos}")
String discoDiretorioFotos;
}
DB_DRIVER_CLASS_NAME="com.mysql.cj.jdbc.Driver"
DB_PLATFORM="org.hibernate.dialect.MySQL8Dialect"
DB_URL="jdbc:mysql://localhost:3306/porto10?createDatabaseIfNotExist=true&serverTimezone=UTC"
DB_USERNAME="root"
DB_PASSWORD="root"
SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE="2GB"
SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE="2GB"
MAIL_HOST="smtp.gmail.com"
MAIL_PORT="587"
MAIL_USERNAME="pauloacb2020@gmail.com"
MAIL_PASSWORD="ehyn ryqu utgv ntjd"
MAIL_SMTP_AUTH="true"
MAIL_SMTP_STARTTLS_ENABLE="true"
JPA_SHOW_SQL="true"
JPA_MERGE_ENTITY_COPY_OBSERVER="allow"
JPA_HIBERNATE_DDL_AUTO="update"
JPA_HIBERNATE_FORMAT_SQL="true"
PAGEABLE_ONE_INDEXED_PARAMETERS="true"
PAGEABLE_DEFAULT_PAGE_SIZE="2"
PAGEABLE_MAX_PAGE_SIZE="20"
JWT_ACCESS_SECRET="b9048bb98d808d82bf7250333035db0ea7ada419a53153ec550fcf3dd6d51b13"
JWT_ACCESS_EXPIRES_IN="3600"
JWT_REFRESH_SECRET="5893d555ee0b886b14929d630c2027b912c104ca29295bf9fd126666baf5bff1"
JWT_REFRESH_EXPIRES_IN="7200"
DISCO_RAIZ=C:\\fotos-java
DISCO_DIRETORIO_FOTOS=contato-disco
{"properties": [
{
"name": "br.com.treinaweb.twjobs.jwt.accessSecret",
"type": "java.lang.String",
"description": "Chave secreta para geração do token de acesso"
},
{
"name": "br.com.treinaweb.twjobs.jwt.accessExpiresIn",
"type": "java.lang.Long",
"description": "Tempo de expiração em segundos do token de acesso"
},
{
"name": "br.com.treinaweb.twjobs.jwt.refreshSecret",
"type": "java.lang.String",
"description": "Chave secreta para geração do token de atualização"
},
{
"name": "br.com.treinaweb.twjobs.jwt.refreshExpiresIn",
"type": "java.lang.Long",
"description": "Tempo de expiração em segundos do token de atualização"
}
]}
\ No newline at end of file
spring.datasource.driver-class-name=${DB_DRIVER_CLASS_NAME}
spring.jpa.database-platform=${DB_PLATFORM}
spring.datasource.url=${DB_URL}
spring.datasource.username=${DB_USERNAME}
spring.datasource.password=${DB_PASSWORD}
spring.servlet.multipart.max-file-size=${SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE}
spring.servlet.multipart.max-request-size=${SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE}
spring.mail.host=${MAIL_HOST}
spring.mail.port=${MAIL_PORT}
spring.mail.username=${MAIL_USERNAME}
spring.mail.password=${MAIL_PASSWORD}
spring.mail.properties.mail.smtp.auth=${MAIL_SMTP_AUTH}
spring.mail.properties.mail.smtp.starttls.enable=${MAIL_SMTP_STARTTLS_ENABLE}
spring.jpa.show-sql=${JPA_SHOW_SQL}
spring.jpa.properties.hibernate.event.merge.entity_copy_observer=${JPA_MERGE_ENTITY_COPY_OBSERVER}
spring.jpa.hibernate.ddl-auto=${JPA_HIBERNATE_DDL_AUTO}
spring.jpa.properties.hibernate.format_sql=${JPA_HIBERNATE_FORMAT_SQL}
spring.data.web.pageable.one-indexed-parameters=${PAGEABLE_ONE_INDEXED_PARAMETERS}
spring.data.web.pageable.default-page-size=${PAGEABLE_DEFAULT_PAGE_SIZE}
spring.data.web.pageable.max-page-size=${PAGEABLE_MAX_PAGE_SIZE}
jwt.access.secret=${JWT_ACCESS_SECRET}
jwt.access.expires-in=${JWT_ACCESS_EXPIRES_IN}
jwt.refresh.secret=${JWT_REFRESH_SECRET}
jwt.refresh.expires-in=${JWT_REFRESH_EXPIRES_IN}
contato.disco.raiz = ${DISCO_RAIZ}
contato.disco.diretorio-fotos = ${DISCO_DIRETORIO_FOTOS}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment