Commit 840225534398859f390b89aff4f1cf726c4d2bff
1 parent
b39c03f4
Exists in
master
Corrigindo profiles do Spring
Showing
3 changed files
with
11 additions
and
9 deletions
Show diff stats
codigos/backend/src/main/java/edu/ifes/ci/si/les/srh/services/DBService.java
@@ -4,10 +4,12 @@ import edu.ifes.ci.si.les.srh.builder.TagBuilder; | @@ -4,10 +4,12 @@ import edu.ifes.ci.si.les.srh.builder.TagBuilder; | ||
4 | import edu.ifes.ci.si.les.srh.model.Tag; | 4 | import edu.ifes.ci.si.les.srh.model.Tag; |
5 | import edu.ifes.ci.si.les.srh.repository.TagRepository; | 5 | import edu.ifes.ci.si.les.srh.repository.TagRepository; |
6 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
7 | +import org.springframework.stereotype.Service; | ||
7 | 8 | ||
8 | import java.text.ParseException; | 9 | import java.text.ParseException; |
9 | import java.util.Arrays; | 10 | import java.util.Arrays; |
10 | 11 | ||
12 | +@Service | ||
11 | public class DBService { | 13 | public class DBService { |
12 | @Autowired | 14 | @Autowired |
13 | private TagRepository tagRepository; | 15 | private TagRepository tagRepository; |
codigos/backend/src/main/resources/application-dev.properties
0 → 100644
@@ -0,0 +1,8 @@ | @@ -0,0 +1,8 @@ | ||
1 | +# jpa | ||
2 | +spring.datasource.url=jdbc:postgresql://localhost:5432/srh_les | ||
3 | +spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect | ||
4 | +spring.datasource.username=postgres | ||
5 | +spring.datasource.password=postgres | ||
6 | +spring.jpa.hibernate.ddl-auto=create | ||
7 | +spring.jpa.properties.hibernate.show_sql=true | ||
8 | +spring.jpa.properties.hibernate.format_sql=true | ||
0 | \ No newline at end of file | 9 | \ No newline at end of file |
codigos/backend/src/main/resources/application.properties
1 | -# jpa | ||
2 | -spring.datasource.url=jdbc:postgresql://localhost:5432/srh_les | ||
3 | -spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect | ||
4 | -spring.datasource.username=postgres | ||
5 | -spring.datasource.password=postgres | ||
6 | -spring.jpa.hibernate.ddl-auto=create | ||
7 | -spring.jpa.properties.hibernate.show_sql=true | ||
8 | -spring.jpa.properties.hibernate.format_sql=true | ||
9 | -spring.profiles.active=dev | ||
10 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +spring.profiles.active=test | ||
11 | \ No newline at end of file | 3 | \ No newline at end of file |