Skip to content

Commit

Permalink
modified
Browse files Browse the repository at this point in the history
  • Loading branch information
yongjingchuan authored and yongjingchuan committed Aug 19, 2020
1 parent e3680ac commit e3b523e
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 20 deletions.
70 changes: 50 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,46 +108,76 @@ query|查询模块
</dependency>
</dependencies>



<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<defaultGoal>compile</defaultGoal>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>3.0</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<encoding>${encoding}</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<packagingExcludes>WEB-INF/web.xml</packagingExcludes>
<encoding>${project.build.sourceEncoding}</encoding>
<useDefaultDelimiters>true</useDefaultDelimiters>
<includeEmptyDirs>true</includeEmptyDirs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>${encoding}</encoding>
<aggregate>true</aggregate>
<charset>UTF-8</charset>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<includeEmptyDirectories>true</includeEmptyDirectories>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>3.0.1</version><!-- 2.2 -->
<configuration/>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
</plugin>

</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package com.cy.generate.common.builder;

/**
* @Description:
* @Author: YongJingChuan
* @Date: 2020/8/19 19:46
*/
//@Configuration
//@MapperScan(basePackages = {"xxx.xxx.xxx", "xxx.xxx.xxx"}, sqlSessionTemplateRef = "sqlSessionTemplate1")
public class DataSourceOneConfig {

// @Bean(name = "dbProperties1")
// @ConfigurationProperties(prefix = "datasource.cds.data1")
// public DataSourceProperties dataSourceProperties() {
// return new DataSourceProperties();
// }
//
// @Bean(name = "datasource1")
// @Primary
// public DataSource dataSource(@Qualifier(value = "dbProperties1") DataSourceProperties dataSourceProperties) {
// System.out.println(dataSourceProperties);
// DriverManagerDataSource dataSource = new DriverManagerDataSource();
// dataSource.setDriverClassName(dataSourceProperties.getDriverClassName());
// dataSource.setUrl(dataSourceProperties.getUrl());
// Properties properties = new Properties();
// properties.setProperty("dbpool.class", dataSourceProperties.getDbpoolClass());
// properties.setProperty("dbpool.minIdle", dataSourceProperties.getDbpoolMinimumIdle());
// properties.setProperty("dbpool.maximumPoolSize", dataSourceProperties.getDbpoolMaximumPoolSize());
// properties.setProperty("dbpool.maxLifetime", dataSourceProperties.getDbpoolMaxLifetime());
// properties.setProperty("dbpool.connectionTimeout", dataSourceProperties.getDbpoolConnectionTimeout());
// properties.setProperty("dbpool.idleTimeout", dataSourceProperties.getDbpoolIdleTimeout());
// properties.setProperty("wycds.sql", dataSourceProperties.getWycdsSql());
// properties.setProperty("wycds.jdbclog", dataSourceProperties.getWycdsJdbclog());
// properties.setProperty("wycds.range.compare", dataSourceProperties.getWycdsRangeCompare());
// properties.setProperty("wycds.route2all", dataSourceProperties.getWycdsRoute2all());
// properties.setProperty("wycds.wycp.decoding", dataSourceProperties.getWycdsWycpDecoding());
// dataSource.setConnectionProperties(properties);
// return dataSource;
// }
//
// @Bean(name = "sessionFactory1")
// @Primary
// public SqlSessionFactory sqlSessionFactory(@Qualifier(value = "datasource1") DataSource dataSource) throws Exception {
// MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
// bean.setDataSource(dataSource);
// return bean.getObject();
// }
//
// @Bean(name = "transactionManager1")
// @Primary
// public DataSourceTransactionManager dataSourceTransactionManager(@Qualifier("datasource1") DataSource dataSource) {
// return new DataSourceTransactionManager(dataSource);
// }
//
// @Bean(name = "sqlSessionTemplate1")
// @Primary
// public SqlSessionTemplate sqlSessionTemplate(@Qualifier("sessionFactory1") SqlSessionFactory sqlSessionFactory) {
// return new SqlSessionTemplate(sqlSessionFactory);
// }
}

0 comments on commit e3b523e

Please sign in to comment.