Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

programically set data source properties in spring

@Configuration
public class JpaConfig {

    @Bean
    public DataSource getDataSource()
    {
        DataSourceBuilder dataSourceBuilder = DataSourceBuilder.create();
        dataSourceBuilder.driverClassName("org.h2.Driver");
        dataSourceBuilder.url("jdbc:h2:file:C:/temp/test");
        dataSourceBuilder.username("sa");
        dataSourceBuilder.password("");
        return dataSourceBuilder.build();
 
Comment

PREVIOUS NEXT
Code Example
Java :: Reference in java equal operator 
Java :: How to code the Fibonacci Sequence using simple iterative loops in java 
Java :: darkhub 
Java :: java print line 
Java :: .java: Programa al que le indique una fecha dando día, mes y año y te diga si la fecha es correcta o no y en caso de que lo sea te la indique con el mes en forma de texto. 
Java :: concatenar java 
Java :: java class extension 
Java :: ArrayList go to value jav 
Java :: httpsession vs cookie servlet 
Java :: java unused import statement 
Java :: close scanner in while loop java 
Java :: a multi-value map, Map<K, Collection<V, supporting multiple values per key 
Java :: Java Public Access Modifier package two 
Java :: adding new field in existing kibana index using spark java 
Java :: java assertions 
Java :: java reverse serach 
Java :: java non blocking notifier 
Java :: concurrentskiplistset infinite loop in jdk 
Java :: what is this code (long millis=System.currentTimeMillis(); java.sql.Date date=new java.sql.Date(millis); 
Java :: increasing the element without any replacement in java program 
Java :: intellij disable welcome screen 
Java :: read java reader 
Java :: Double matrix 
Java :: int array to map java 
Java :: default constructor java 
Java :: polymorphism vs overriding in java 
Java :: java check if class is subclass 
Java :: find number of weeks between two dates in java 
Java :: java union type 
Java :: maven set repository location command line 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =