Skip to content

Instantly share code, notes, and snippets.

Zoltan Altfatter altfatterz

Block or report user

Report or block altfatterz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am altfatterz on github.
  • I am altfatterz (https://keybase.io/altfatterz) on keybase.
  • I have a public key ASAnynokbxBgngEwA0RkQqIKpe6I9hDyZb7E2fyurSOozwo

To claim this, I am signing this object:

View application.properties
spring.datasource.url=jdbc:postgresql://localhost/test
spring.datasource.username=demo
spring.datasource.password=pass
View application-heroku.properties
spring.datasource.uri=${DATABASE_URL}
spring.data.mongodb.uri=${MONGOLAB_URI}
spring.redis.uri=${REDIS_URL}
View DatabaseConfig.java
public abstract class DatabaseConfig {
protected void configureDataSource(org.apache.tomcat.jdbc.pool.DataSource dataSource) {
dataSource.setMaxActive(20);
dataSource.setMaxIdle(8);
dataSource.setMinIdle(8);
dataSource.setTestOnBorrow(false);
dataSource.setTestOnReturn(false);
dataSource.setValidationQuery("SELECT 1");
}
View gist:cabebe33272fad8b47bf
@Component
@ConfigurationProperties(locations = "classpath:mail.properties", ignoreUnknownFields = false, prefix = "mail")
public class MailProperties {
public static class Smtp {
private boolean auth;
private boolean starttlsEnable;
}
@NotBlank
View gist:188ad1f3e2e76d541e79
my.servers[0]=dev.bar.com
my.servers[1]=foo.bar.com
View gist:f1740dfa5f8a2b524dfe
mvn spring-boot:run
java -jar target/myproject.war
deploy the war into a container
View gist:ed2bee3bab29c8ba4a5f
<?xml version="1.0" encoding="UTF-8"?>
<project ...>
<packaging>war</packaging>
<properties>
<start-class>com.backbase.progfun.Application</start-class>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
View gist:358e8a0e7d5b6b126f41
@Configuration
@Profile("dev")
public class StandaloneDataConfig {
@Bean
public DataSource dataSource() {
return new EmbeddedDatabaseBuilder()
.setType(EmbeddedDatabaseType.H2)
.addScript("classpath:com/bank/config/sql/schema.sql")
.addScript("classpath:com/bank/config/sql/test-data.sql")
View start-jboss.sh
SPRING_PROFILES_ACTIVE=jboss ./standalone.sh -c standalone-backbase.xml
You can’t perform that action at this time.