Skip to content

Instantly share code, notes, and snippets.

View przodownikR1's full-sized avatar

przodownikR1 przodownikR1

View GitHub Profile
:sonarRunner
jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true
jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true
SonarQube Runner 2.3
Java 1.8.0_25 Oracle Corporation (64-bit)
Linux 3.13.0-30-generic amd64
INFO: Runner configuration file: NONE
INFO: Project configuration file: /home/przodownik/.jenkins/jobs/basicEntitySonar/workspace/build/tmp/sonarRunner/sonar-project.properties
INFO: Default locale: "pl_PL", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Work directory: /home/przodownik/.jenkins/jobs/basicEntitySonar/workspace/build/sonar
<property name="location" value="file:${user.home}/prod_app.properties"/>
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
log.info("+++ propertySource -> prop profile launch");
return new PropertySourcesPlaceholderConfigurer();
}
<context:property-placeholder />
//or
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="app.properties"/>
</bean>
Caused by: java.lang.IllegalArgumentException: Invalid boolean value [${hibernate.hbm2ddl.auto}]
Caused by: java.lang.NumberFormatException: For input string: "${boneCp.partition.count}"
@EnableJpaRepositories(basePackages = "pl.java.scalatech.repository")
@ComponentScan(basePackages="pl.java.scalatech.repository",useDefaultFilters=false,includeFilters={@Filter(Repository.class)})
@PropertySource(value="classpath:spring-data.properties")
@Profile(value="test")
@PropertySource("classpath:application.properties")
@Slf4j
public class JpaEmbeddedConfig {
@Autowired
private Environment env;
hibernate.hbm2ddl.auto=true
boneCp.partition.count=20
boneCp.partition.minConnectionsPerPartition=15
boneCp.partition.maxConnectionsPerPartition=25
application.message: Hello ...
hello=Hello from application properties
spring.thymeleaf.suffix=.html
spring.thymeleaf.templateMode=HTML5
spring.thymeleaf.cache=false
spring.profiles.active=dev
@EnableTransactionManagement
@PropertySource("classpath:ds.properties")
@Import(value = { PropertiesLoader.class })
@EnableJpaRepositories("pl.java.scalatech.repository")
public class DsConfig {
@Value("${hibernate.dialect}")
private String dialect;
@Value("${spring.jpa.show-sql}")
private boolean sqlShowFlag;
@Value("${spring.jpa.hibernate.ddl-auto}")