Skip to content
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

Primer avance del lab7 (no hicimos nada) #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
<version>1.18.30</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void main(String[] args) {
@Bean
public CommandLineRunner run() {
return (args) -> {
log.info("Adding Configurations....");
/*log.info("Adding Configurations....");
configurationService.addConfiguration(new Configuration("premio", "810000"));
configurationService.addConfiguration(new Configuration("descuento", "0.1"));
configurationService.addConfiguration(new Configuration("app-name", "Miraculous: Las Aventuras de Ladybug"));
Expand All @@ -48,6 +48,7 @@ public CommandLineRunner run() {

log.info("\nAdding [email protected] user with Password: admin");
userRepository.save(new User("[email protected]", "admin", Arrays.asList(UserRole.ADMINISTRADOR, UserRole.CLIENTE)));
*/
};
}

Expand Down
24 changes: 22 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,30 @@ spring.groovy.template.cache = false
# spring.jpa.hibernate.ddl-auto=create-drop
# next line updates the database on startup
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=${MYSQLCONNSTR_MyDatabase:jdbc:mysql://localhost:3306/cvds?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true&user=root&password=my-secret-pw}
#spring.datasource.url=${MYSQLCONNSTR_MyDatabase:jdbc:mysql://localhost:3306/cvds?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true&user=root&password=my-secret-pw}
#spring.datasource.username=root
#spring.datasource.password=my-secret-pw
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
#spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
spring.jpa.show-sql=true

#esto lo cambiamos
spring.datasource.url=jdbc:h2:file:/data/demo #esto lo cambiamos
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect

#esto lo cambiamos
spring.sql.init.data-locations=import_active_users.sql,import_inactive_users.sql

#esto lo cambiamos


#esto lo cambiamos
spring.jpa.defer-datasource-initialization=true

#esto lo cambiamos
spring.h2.console.enabled=true


#
Empty file added src/main/resources/data.sql
Empty file.