BAEL-2105: Change for deployment to Cloud Foundry (#5060)
This commit is contained in:
committed by
Predrag Maric
parent
2a12e9abd4
commit
5deb5311f8
+19
@@ -0,0 +1,19 @@
|
||||
package org.baeldung.cloud.config;
|
||||
|
||||
import org.springframework.cloud.config.java.AbstractCloudConfig;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@Configuration
|
||||
@Profile("cloud")
|
||||
public class CloudDataSourceConfig extends AbstractCloudConfig {
|
||||
|
||||
@Bean
|
||||
public DataSource dataSource() {
|
||||
return connectionFactory().dataSource();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
server.port = 8081
|
||||
|
||||
spring.application.name = Bootstrap Spring Boot
|
||||
|
||||
spring.thymeleaf.cache = false
|
||||
spring.thymeleaf.enabled=true
|
||||
spring.thymeleaf.prefix=classpath:/templates/
|
||||
spring.thymeleaf.suffix=.html
|
||||
|
||||
spring.security.user.name=john
|
||||
spring.security.user.password=123
|
||||
|
||||
spring.datasource.driver-class-name=org.h2.Driver
|
||||
spring.datasource.url=jdbc:h2:mem:bootapp;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
||||
spring.datasource.username=sa
|
||||
spring.datasource.password=
|
||||
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
|
||||
|
||||
server.error.path=/error
|
||||
server.error.whitelabel.enabled=false
|
||||
@@ -0,0 +1 @@
|
||||
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
@@ -1,19 +1,11 @@
|
||||
server.port = 8081
|
||||
|
||||
spring.application.name = Bootstrap Spring Boot
|
||||
|
||||
server.port=${port:8080}
|
||||
spring.application.name = Bootstrap Spring Cloud
|
||||
spring.thymeleaf.cache = false
|
||||
spring.thymeleaf.enabled=true
|
||||
spring.thymeleaf.prefix=classpath:/templates/
|
||||
spring.thymeleaf.suffix=.html
|
||||
|
||||
spring.security.user.name=john
|
||||
spring.security.user.password=123
|
||||
|
||||
spring.datasource.driver-class-name=org.h2.Driver
|
||||
spring.datasource.url=jdbc:h2:mem:bootapp;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
||||
spring.datasource.username=sa
|
||||
spring.datasource.password=
|
||||
|
||||
server.error.path=/error
|
||||
server.error.whitelabel.enabled=false
|
||||
server.error.whitelabel.enabled=false
|
||||
|
||||
spring.jpa.generate-ddl=true
|
||||
Reference in New Issue
Block a user