Skip to content

Commit

Permalink
Change application properties configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoAGM committed Jun 16, 2019
1 parent 209dfd9 commit eb55f48
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 49 deletions.
29 changes: 0 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,8 @@
</dependencies>

<build>
<filters>
<filter>profiles/${build.profile.id}/configuracion.properties</filter>
</filters>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
Expand Down Expand Up @@ -141,29 +137,4 @@
</plugins>
</build>

<!-- Configurar los Profiles que tenga la aplicación -->
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<build.profile.id>dev</build.profile.id>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<build.profile.id>prod</build.profile.id>
</properties>
</profile>
<profile>
<id>test</id>
<properties>
<build.profile.id>test</build.profile.id>
</properties>
</profile>
</profiles>

</project>
5 changes: 0 additions & 5 deletions profiles/dev/configuracion.properties

This file was deleted.

5 changes: 0 additions & 5 deletions profiles/prod/configuracion.properties

This file was deleted.

5 changes: 0 additions & 5 deletions profiles/test/configuracion.properties

This file was deleted.

8 changes: 8 additions & 0 deletions src/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
server.port=8080
spring.datasource.url=jdbc:mysql://localhost:3306/projectionapi?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=Rodrigo1807
spring.jpa.hibernate.ddl-auto=update
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect

15 changes: 15 additions & 0 deletions src/test/resources/application.properties.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Application properties

Create the Schema in MySQL Workbench named `projectionapi`.
Then create the `application.properties` inside `src/main/resources` file with this lines:


`server.port=8080`
`spring.datasource.url=jdbc:mysql://localhost:3306/projectionapi?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC`
`spring.datasource.username=YOUR_DB_USERNAME`
`spring.datasource.password=YOUR_DB_PASSWORD`
`spring.jpa.hibernate.ddl-auto=update`
`spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver`
`spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect`


5 changes: 0 additions & 5 deletions src/test/resources/configuracion.properties

This file was deleted.

0 comments on commit eb55f48

Please sign in to comment.