mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 07:15:49 +00:00
Aggiunte in configurazioni di avvio:
-Aggiunti profili local e prod modificabili nel campo Environment -Password db criptata (la secret key si trova nel campo Arguments) N.B. la secret key è uguale al nome del profilo che si sta utilizzando
This commit is contained in:
parent
381ffe33bf
commit
8c3caf06e8
41 changed files with 2594 additions and 2600 deletions
11
pom.xml
11
pom.xml
|
@ -11,7 +11,9 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.2.5.RELEASE</version>
|
||||
|
||||
</parent>
|
||||
|
||||
<name>petclinic</name>
|
||||
|
||||
<properties>
|
||||
|
@ -20,7 +22,6 @@
|
|||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
||||
<!-- Web dependencies -->
|
||||
<webjars-bootstrap.version>3.3.6</webjars-bootstrap.version>
|
||||
<webjars-jquery-ui.version>1.11.4</webjars-jquery-ui.version>
|
||||
|
@ -65,6 +66,12 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- Jasypt implementation -->
|
||||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Databases - postgresql implementation -->
|
||||
<dependency>
|
||||
|
@ -72,6 +79,7 @@
|
|||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- caching -->
|
||||
<dependency>
|
||||
<groupId>javax.cache</groupId>
|
||||
|
@ -372,5 +380,4 @@
|
|||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -19,6 +19,8 @@ package org.springframework.samples.petclinic;
|
|||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||
|
||||
/**
|
||||
* PetClinic Spring Boot Application.
|
||||
*
|
||||
|
@ -26,6 +28,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||
*
|
||||
*/
|
||||
@SpringBootApplication(proxyBeanMethods = false)
|
||||
@EnableEncryptableProperties
|
||||
public class PetClinicApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
|
|
@ -1,24 +1,6 @@
|
|||
# default connection pool
|
||||
spring.datasource.hikari.connectionTimeout=20000
|
||||
spring.datasource.hikari.maximumPoolSize=5
|
||||
# PostgreSQL connection and inizialization
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5432/petclinic
|
||||
spring.datasource.username=postgres
|
||||
spring.datasource.password=pass
|
||||
spring.datasource.sql-script-encoding= UTF-8
|
||||
spring.datasource.schema=classpath*:db/postgres/schema.sql
|
||||
spring.datasource.data=classpath*:db/postgres/data.sql
|
||||
spring.datasource.initialization-mode=always
|
||||
|
||||
|
||||
# Web
|
||||
spring.thymeleaf.mode=HTML
|
||||
|
||||
# JPA
|
||||
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
|
||||
spring.jpa.hibernate.ddl-auto=none
|
||||
spring.jpa.open-in-view=false
|
||||
|
||||
# Internationalization
|
||||
spring.messages.basename=messages/messages
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ class ValidatorTests {
|
|||
assertThat(violation.getPropertyPath().toString()).isEqualTo("firstName");
|
||||
assertThat(violation.getMessage()).isEqualTo("must not be empty");
|
||||
}
|
||||
|
||||
/* My test */
|
||||
@Test
|
||||
void validateWhenFirstNameNotEmpty() {
|
||||
|
@ -70,6 +71,7 @@ class ValidatorTests {
|
|||
|
||||
assertThat(constraintViolations).hasSize(0);
|
||||
}
|
||||
|
||||
/* My test */
|
||||
@Test
|
||||
void shouldNotValidateWhenLastNameEmpty() {
|
||||
|
|
Loading…
Reference in a new issue