Skip to content

Commit

Permalink
Merge pull request #28 from consiglionazionaledellericerche/27-introd…
Browse files Browse the repository at this point in the history
…urre-un-database-schema-configurabile-per-laccesso-alle-tabelle-oracle

Introdotto default database schema configurabile.
  • Loading branch information
criluc authored Mar 15, 2024
2 parents 66c4164 + ec66554 commit 1a65e64
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
4 changes: 3 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ services:
- 'APP_USER=cnr'
- 'APP_USER_PASSWORD=secret'
ports:
- '1521:1521'
- '1521:1521'
labels:
org.springframework.boot.ignore: true
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package it.cnr.iit.epas.timesheet.ugovpj;
package it.cnr.iit.epas.timesheet.ugovpj.jobs;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@ToString
@Data
@Entity
@Table(name = "ie_pj_marcature")
@Table(name = "IE_PJ_MARCATURE")
public class PersonTimeDetail {

@Id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2024 Consiglio Nazionale delle Ricerche
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package it.cnr.iit.epas.timesheet.ugovpj.model;

import jakarta.persistence.Column;
Expand All @@ -22,7 +38,7 @@
@ToString
@Data
@Entity
@Table(name = "ie_pj_marcature_tipi")
@Table(name = "IE_PJ_MARCATURE_TIPI")
public class TimeDetailType {

@Id
Expand Down
13 changes: 7 additions & 6 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Oracle configuration
spring.datasource.url=jdbc:oracle:thin:@//oracle:1521/ugov-pj-timesheet
#spring.datasource.username=cnr
#spring.datasource.password=secret
spring.datasource.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=ON)(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=hostname-1-da-impostare.cineca.it)(PORT=5555))(ADDRESS=(PROTOCOL=TCP)(HOST=hostname-2-da-impostare.cineca.it)(PORT=5555)))(CONNECT_DATA=(SERVICE_NAME=service-name-da-impostare.cineca.it)))
spring.datasource.username=username-da-impostare
spring.datasource.password=password-da-impostare
spring.datasource.testWhileIdle=true
spring.datasource.validationQuery=SELECT 1
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
#hibernate config
spring.jpa.database-platform=org.hibernate.dialect.OracleDialect
#spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=none

spring.jpa.properties.hibernate.default_schema=SIAIE_CNR_PREPROD

spring.profiles.active=dev

Expand Down

0 comments on commit 1a65e64

Please sign in to comment.