Skip to content

Spring security pre update #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .idea/dataSources.local.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
18 changes: 5 additions & 13 deletions etc/db/setup-postgresql-account-and-db.sql
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
CREATE ROLE simpleworklist LOGIN
PASSWORD 'simpleworklistpwd'
SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION;

GRANT pg_monitor TO simpleworklist;
GRANT pg_read_all_settings TO simpleworklist;
GRANT pg_read_all_stats TO simpleworklist;
GRANT pg_signal_backend TO simpleworklist;
GRANT pg_stat_scan_tables TO simpleworklist;

CREATE ROLE simpleworklistref LOGIN
PASSWORD 'simpleworklistrefpwd'
SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION;
GRANT pg_monitor TO simpleworklistref;
GRANT pg_read_all_settings TO simpleworklistref;
GRANT pg_read_all_stats TO simpleworklistref;
GRANT pg_signal_backend TO simpleworklistref;
GRANT pg_stat_scan_tables TO simpleworklistref;

CREATE TABLESPACE tablespace_simpleworklist
OWNER tw
LOCATION '/opt/postgresql/tablespace_simpleworklist';

CREATE TABLESPACE tablespace_simpleworklist
OWNER tw
LOCATION 'C:\tablespace_pg\simpleworklist';
-- CREATE TABLESPACE tablespace_simpleworklist
-- OWNER tw
-- LOCATION 'C:\tablespace_pg\simpleworklist';

ALTER TABLESPACE tablespace_simpleworklist
OWNER TO simpleworklist;
Expand All @@ -34,7 +26,7 @@ CREATE DATABASE simpleworklist
CONNECTION LIMIT = -1;

CREATE DATABASE simpleworklistref
WITH OWNER = simpleworklistref
WITH OWNER = simpleworklist
ENCODING = 'UTF8'
TABLESPACE = tablespace_simpleworklist
CONNECTION LIMIT = -1;
11 changes: 11 additions & 0 deletions liquibase.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
changeLogFile=src/main/resources/db/liquibase-changelog.xml
diffChangeLogFile=src/main/resources/db/liquibase-diff-changelog.xml
classpath=target/dependency/postgresql-42.5.1.jar
driver=org.postgresql.Driver
url=jdbc:postgresql://localhost:5432/simpleworklist
username=simpleworklist
password=simpleworklistpwd
referenceDriver=org.postgresql.Driver
referenceUrl=jdbc:postgresql://localhost:5432/simpleworklistref
referenceUsername=simpleworklist
referencePassword=simpleworklistpwd
38 changes: 35 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</distributionManagement>

<properties>
<version.java>11</version.java>
<version.java>17</version.java>
<version.maven>3.6.3</version.maven>
<maven.compiler.source>${version.java}</maven.compiler.source>
<maven.compiler.target>${version.java}</maven.compiler.target>
Expand Down Expand Up @@ -113,6 +113,10 @@
<version.maven-release-plugin>3.0.0-M7</version.maven-release-plugin>
<version.maven-release-plugin.scm>1.13.0</version.maven-release-plugin.scm>

<!-- Database Evolution -->
<version.org.postgresql>42.5.1</version.org.postgresql>
<liquibase.propertyFile>${project.basedir}/liquibase.properties</liquibase.propertyFile>

<!-- UML -->
<version.plantuml-maven-plugin>1.5.2</version.plantuml-maven-plugin>
<version.plantuml-maven-plugin.plantuml>1.2022.6</version.plantuml-maven-plugin.plantuml>
Expand Down Expand Up @@ -314,7 +318,12 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.5.0</version>
<version>42.5.1</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon-dom</artifactId>
<version>8.7</version>
</dependency>

<!-- SCM -->
Expand Down Expand Up @@ -682,10 +691,18 @@
<artifactId>thymeleaf-testing</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon-dom</artifactId>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
Expand Down Expand Up @@ -1096,11 +1113,12 @@
<file>${project.basedir}/build.sh</file>
<file>${project.basedir}/etc/run.sh</file>
<file>${project.basedir}/etc/bash/psql.sh</file>
<file>${project.basedir}/src/main/resources/docker-compose.yml</file>
<file>${project.basedir}/etc/docker-start.sh</file>
<file>${project.basedir}/etc/docker-stop.sh</file>
<file>${project.basedir}/docker-compose.yml</file>
<file>${project.basedir}/etc/sql/db-createdb-and-user-linux.sql</file>
<file>${project.basedir}/etc/sql/db-createdb-and-user-win10.sql</file>
<file>${project.basedir}/liquibase.properties</file>
</files>
</requireFilesExist>
</rules>
Expand Down Expand Up @@ -1331,6 +1349,20 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<configuration>
<propertyFile>liquibase.properties</propertyFile>
</configuration>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${version.org.postgresql}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spring:
config:
name: simpleworklist
liquibase:
enabled: false
enabled: true
devtools:
livereload:
enabled: ${SIMPLEWORKLIST_DEV_TESTING}
Expand All @@ -33,7 +33,7 @@ spring:
generate-ddl: true
database-platform: POSTGRESQL
hibernate:
#ddl-auto: create-drop update
#ddl-auto: create-drop update validate
ddl-auto: ${BLOODMONEY_HIBERNATE_DDL_AUTO}
naming:
implicit-strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl
Expand Down Expand Up @@ -152,7 +152,8 @@ spring:
log-dir: transaction-logs/tx-logs-simpleworklist
jpa:
hibernate:
ddl-auto: update
#ddl-auto: create-drop update validate
ddl-auto: validate
server:
port: ${PORT}
compression:
Expand Down
Loading