You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/12/02 10:58:23 UTC

[GitHub] [shardingsphere] fyuan1030 opened a new issue #8475: how to deal with the conflict about starter

fyuan1030 opened a new issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475


   hello the shardingsphere team,I found a problem when I used shardingsphere-jdbc-spring-boot-starter-infra 5.0.0-alpha;
   when I used shardiing-jdbc-spring-boot-starter 4.1.1 and  mybatis-spring-boot-starter;pagehelp-spring-boot-starter and druid(not starter);my project can run,but when I change sharding-jdbc with shardingsphere-jdbc-spring-boot-starter-infra 5.0.0-alpha,my project can't run。it told me 
   `Cannot determine embedded database driver class for database type NONECannot determine`
   when I exclusion spring-boot-starter-jdbc,it told me 
   `Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required`
   how can I solve this conflict;


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 edited a comment on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
tuohai666 edited a comment on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737667814


   Get it. Is the problem resolved now? 
   @fyuan1030


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 edited a comment on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
tuohai666 edited a comment on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737646413


   @fyuan1030  Please refer to https://github.com/apache/shardingsphere/issues/5929 or https://github.com/apache/shardingsphere/issues/7933 maybe it can help.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737699830


   @yu199195 Can you have a look?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737645507


   @fyuan1030 I noticed you closed this issue? But it seems like you have subsequent question. How can I understand it?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] yu199195 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
yu199195 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737634980


   @fyuan1030 can you show  shardingsphere config?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737651936


   > @fyuan1030 Please refer to #5929 or #7933 maybe it can help.
   
   and when I use `sharding-jdbc-spring-boot-starter version 4.1.1`,I can run my project;but when I update version to `shardingsphere-jdbc-spring-boot-starter-infra version 5.0.0-alpha`,my project can't run。and there are little information about `shardingsphere-jdbc-spring-boot-starter-infra version 5.0.0-alpha` with Google;so I submit it


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737640207


   > @fyuan1030 can you show shardingsphere config?
   
   ```
   spring:
     shardingsphere:
       datasource:
         name: databasename
         "databasename":
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: com.mysql.jdbc.Driver
           ……
           ……
   ```
   I think these are enough。if anything else you need please tell me;i will try it
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737645773


   > @fyuan1030 I noticed you closed this issue? But it seems like you have subsequent question. How can I understand it?
   
   sorry,I click it by mistake。。。。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 removed a comment on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 removed a comment on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737638093


   > @fyuan1030 you can not use `mybatis-spring-boot-starter` .
   
   
   
   > Hi, please fill in the template.
   > 
   > ```
   > 
   > ## Bug Report
   > 
   > **For English only**, other languages will not accept.
   > 
   > Before report a bug, make sure you have:
   > 
   > - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   > - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   > 
   > Please pay attention on issues you submitted, because we maybe need more details. 
   > If no response anymore and we cannot reproduce it on current information, we will **close it**.
   > 
   > Please answer these questions before submitting your issue. Thanks!
   > 
   > ### Which version of ShardingSphere did you use?
   > 
   > ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   > 
   > ### Expected behavior
   > 
   > ### Actual behavior
   > 
   > ### Reason analyze (If you can)
   > 
   > ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   > 
   > ### Example codes for reproduce this issue (such as a github link).
   > ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] yu199195 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
yu199195 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737636019


   @fyuan1030 you can not use  `mybatis-spring-boot-starter` . 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 closed issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 closed issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737695117


   
   
   
   > Get it. Is the problem resolved now?
   > @fyuan1030
   
   no,to be honest,I think it as this class which in version 4.1.1 was changed;
   
   in version 4.1.1
   ```
   /*
    * Licensed to the Apache Software Foundation (ASF) under one or more
    * contributor license agreements.  See the NOTICE file distributed with
    * this work for additional information regarding copyright ownership.
    * The ASF licenses this file to You under the Apache License, Version 2.0
    * (the "License"); you may not use this file except in compliance with
    * the License.  You may obtain a copy of the License at
    *
    *     http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
   
   package org.apache.shardingsphere.shardingjdbc.spring.boot;
   
   import com.google.common.base.Preconditions;
   import lombok.RequiredArgsConstructor;
   import org.apache.shardingsphere.core.yaml.swapper.MasterSlaveRuleConfigurationYamlSwapper;
   import org.apache.shardingsphere.core.yaml.swapper.ShardingRuleConfigurationYamlSwapper;
   import org.apache.shardingsphere.core.yaml.swapper.impl.ShadowRuleConfigurationYamlSwapper;
   import org.apache.shardingsphere.encrypt.yaml.swapper.EncryptRuleConfigurationYamlSwapper;
   import org.apache.shardingsphere.shardingjdbc.api.EncryptDataSourceFactory;
   import org.apache.shardingsphere.shardingjdbc.api.MasterSlaveDataSourceFactory;
   import org.apache.shardingsphere.shardingjdbc.api.ShadowDataSourceFactory;
   import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
   import org.apache.shardingsphere.shardingjdbc.spring.boot.common.SpringBootPropertiesConfigurationProperties;
   import org.apache.shardingsphere.shardingjdbc.spring.boot.encrypt.EncryptRuleCondition;
   import org.apache.shardingsphere.shardingjdbc.spring.boot.encrypt.SpringBootEncryptRuleConfigurationProperties;
   import org.apache.shardingsphere.shardingjdbc.spring.boot.masterslave.MasterSlaveRuleCondition;
   import org.apache.shardingsphere.shardingjdbc.spring.boot.masterslave.SpringBootMasterSlaveRuleConfigurationProperties;
   import org.apache.shardingsphere.shardingjdbc.spring.boot.shadow.ShadowRuleCondition;
   import org.apache.shardingsphere.shardingjdbc.spring.boot.shadow.SpringBootShadowRuleConfigurationProperties;
   import org.apache.shardingsphere.shardingjdbc.spring.boot.sharding.ShardingRuleCondition;
   import org.apache.shardingsphere.shardingjdbc.spring.boot.sharding.SpringBootShardingRuleConfigurationProperties;
   import org.apache.shardingsphere.spring.boot.datasource.DataSourcePropertiesSetterHolder;
   import org.apache.shardingsphere.spring.boot.util.DataSourceUtil;
   import org.apache.shardingsphere.spring.boot.util.PropertyUtil;
   import org.apache.shardingsphere.transaction.spring.ShardingTransactionTypeScanner;
   import org.apache.shardingsphere.underlying.common.config.inline.InlineExpressionParser;
   import org.apache.shardingsphere.underlying.common.exception.ShardingSphereException;
   import org.springframework.boot.autoconfigure.AutoConfigureBefore;
   import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
   import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
   import org.springframework.boot.context.properties.EnableConfigurationProperties;
   import org.springframework.context.EnvironmentAware;
   import org.springframework.context.annotation.Bean;
   import org.springframework.context.annotation.ComponentScan;
   import org.springframework.context.annotation.Conditional;
   import org.springframework.context.annotation.Configuration;
   import org.springframework.core.env.Environment;
   import org.springframework.core.env.StandardEnvironment;
   import org.springframework.jndi.JndiObjectFactoryBean;
   
   import javax.naming.NamingException;
   import javax.sql.DataSource;
   import java.sql.SQLException;
   import java.util.Collections;
   import java.util.LinkedHashMap;
   import java.util.List;
   import java.util.Map;
   
   /**
    * Spring boot starter configuration.
    */
   @Configuration
   @ComponentScan("org.apache.shardingsphere.spring.boot.converter")
   @EnableConfigurationProperties({
           SpringBootShardingRuleConfigurationProperties.class,
           SpringBootMasterSlaveRuleConfigurationProperties.class, SpringBootEncryptRuleConfigurationProperties.class,
           SpringBootPropertiesConfigurationProperties.class, SpringBootShadowRuleConfigurationProperties.class})
   @ConditionalOnProperty(prefix = "spring.shardingsphere", name = "enabled", havingValue = "true", matchIfMissing = true)
   @AutoConfigureBefore(DataSourceAutoConfiguration.class)
   @RequiredArgsConstructor
   public class SpringBootConfiguration implements EnvironmentAware {
       
       private final SpringBootShardingRuleConfigurationProperties shardingRule;
       
       private final SpringBootMasterSlaveRuleConfigurationProperties masterSlaveRule;
       
       private final SpringBootEncryptRuleConfigurationProperties encryptRule;
       
       private final SpringBootShadowRuleConfigurationProperties shadowRule;
       
       private final SpringBootPropertiesConfigurationProperties props;
       
       private final Map<String, DataSource> dataSourceMap = new LinkedHashMap<>();
       
       private final String jndiName = "jndi-name";
       
       /**
        * Get sharding data source bean.
        *
        * @return data source bean
        * @throws SQLException SQL exception
        */
       @Bean
       @Conditional(ShardingRuleCondition.class)
       public DataSource shardingDataSource() throws SQLException {
           return ShardingDataSourceFactory.createDataSource(dataSourceMap, new ShardingRuleConfigurationYamlSwapper().swap(shardingRule), props.getProps());
       }
       
       /**
        * Get master-slave data source bean.
        *
        * @return data source bean
        * @throws SQLException SQL exception
        */
       @Bean
       @Conditional(MasterSlaveRuleCondition.class)
       public DataSource masterSlaveDataSource() throws SQLException {
           return MasterSlaveDataSourceFactory.createDataSource(dataSourceMap, new MasterSlaveRuleConfigurationYamlSwapper().swap(masterSlaveRule), props.getProps());
       }
       
       /**
        * Get encrypt data source bean.
        *
        * @return data source bean
        * @throws SQLException SQL exception
        */
       @Bean
       @Conditional(EncryptRuleCondition.class)
       public DataSource encryptDataSource() throws SQLException {
           return EncryptDataSourceFactory.createDataSource(dataSourceMap.values().iterator().next(), new EncryptRuleConfigurationYamlSwapper().swap(encryptRule), props.getProps());
       }
       
       /**
        * Get shadow data source bean.
        *
        * @return data source bean
        * @throws SQLException SQL exception
        */
       @Bean
       @Conditional(ShadowRuleCondition.class)
       public DataSource shadowDataSource() throws SQLException {
           return ShadowDataSourceFactory.createDataSource(dataSourceMap, new ShadowRuleConfigurationYamlSwapper().swap(shadowRule), props.getProps());
       }
       
       /**
        * Create sharding transaction type scanner.
        *
        * @return sharding transaction type scanner
        */
       @Bean
       public ShardingTransactionTypeScanner shardingTransactionTypeScanner() {
           return new ShardingTransactionTypeScanner();
       }
       
       @Override
       public final void setEnvironment(final Environment environment) {
           String prefix = "spring.shardingsphere.datasource.";
           for (String each : getDataSourceNames(environment, prefix)) {
               try {
                   dataSourceMap.put(each, getDataSource(environment, prefix, each));
               } catch (final ReflectiveOperationException ex) {
                   throw new ShardingSphereException("Can't find datasource type!", ex);
               } catch (final NamingException namingEx) {
                   throw new ShardingSphereException("Can't find JNDI datasource!", namingEx);
               }
           }
       }
       
       private List<String> getDataSourceNames(final Environment environment, final String prefix) {
           StandardEnvironment standardEnv = (StandardEnvironment) environment;
           standardEnv.setIgnoreUnresolvableNestedPlaceholders(true);
           return null == standardEnv.getProperty(prefix + "name")
                   ? new InlineExpressionParser(standardEnv.getProperty(prefix + "names")).splitAndEvaluate() : Collections.singletonList(standardEnv.getProperty(prefix + "name"));
       }
       
       @SuppressWarnings("unchecked")
       private DataSource getDataSource(final Environment environment, final String prefix, final String dataSourceName) throws ReflectiveOperationException, NamingException {
           Map<String, Object> dataSourceProps = PropertyUtil.handle(environment, prefix + dataSourceName.trim(), Map.class);
           Preconditions.checkState(!dataSourceProps.isEmpty(), "Wrong datasource properties!");
           if (dataSourceProps.containsKey(jndiName)) {
               return getJndiDataSource(dataSourceProps.get(jndiName).toString());
           }
           DataSource result = DataSourceUtil.getDataSource(dataSourceProps.get("type").toString(), dataSourceProps);
           DataSourcePropertiesSetterHolder.getDataSourcePropertiesSetterByType(dataSourceProps.get("type").toString()).ifPresent(
               dataSourcePropertiesSetter -> dataSourcePropertiesSetter.propertiesSet(environment, prefix, dataSourceName, result));
           return result;
       }
       
       private DataSource getJndiDataSource(final String jndiName) throws NamingException {
           JndiObjectFactoryBean bean = new JndiObjectFactoryBean();
           bean.setResourceRef(true);
           bean.setJndiName(jndiName);
           bean.setProxyInterface(DataSource.class);
           bean.afterPropertiesSet();
           return (DataSource) bean.getObject();
       }
   }
   
   ```
   there is a
    ```
   @ConditionalOnProperty(prefix = "spring.shardingsphere", name = "enabled", havingValue = "true", matchIfMissing = true)
   @AutoConfigureBefore(DataSourceAutoConfiguration.class)
   ```
   so the datasource can inject before spring‘s autoconfig
   
   in versin 5.0.0
   
   ```
   /*
    * Licensed to the Apache Software Foundation (ASF) under one or more
    * contributor license agreements.  See the NOTICE file distributed with
    * this work for additional information regarding copyright ownership.
    * The ASF licenses this file to You under the Apache License, Version 2.0
    * (the "License"); you may not use this file except in compliance with
    * the License.  You may obtain a copy of the License at
    *
    *     http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
   
   package org.apache.shardingsphere.spring.boot.datasource;
   
   import com.google.common.base.Preconditions;
   import lombok.AccessLevel;
   import lombok.NoArgsConstructor;
   import org.apache.shardingsphere.infra.exception.ShardingSphereException;
   import org.apache.shardingsphere.sharding.algorithm.sharding.inline.InlineExpressionParser;
   import org.apache.shardingsphere.spring.boot.datasource.prop.impl.DataSourcePropertiesSetterHolder;
   import org.apache.shardingsphere.spring.boot.util.DataSourceUtil;
   import org.apache.shardingsphere.spring.boot.util.PropertyUtil;
   import org.springframework.core.env.Environment;
   import org.springframework.core.env.StandardEnvironment;
   import org.springframework.jndi.JndiObjectFactoryBean;
   import org.springframework.util.StringUtils;
   
   import javax.naming.NamingException;
   import javax.sql.DataSource;
   import java.util.LinkedHashMap;
   import java.util.List;
   import java.util.Map;
   
   /**
    * Data source map setter.
    */
   @NoArgsConstructor(access = AccessLevel.PRIVATE)
   public final class DataSourceMapSetter {
       
       private static final String PREFIX = "spring.shardingsphere.datasource.";
       
       private static final String COMMON_PREFIX = "spring.shardingsphere.datasource.common.";
       
       private static final String DATA_SOURCE_NAME = "name";
       
       private static final String DATA_SOURCE_NAMES = "names";
       
       private static final String DATA_SOURCE_TYPE = "type";
       
       private static final String JNDI_NAME = "jndi-name";
       
       /**
        * Get data source map.
        * 
        * @param environment spring boot environment
        * @return data source map
        */
       @SuppressWarnings("unchecked")
       public static Map<String, DataSource> getDataSourceMap(final Environment environment) {
           Map<String, DataSource> result = new LinkedHashMap<>();
           Map<String, Object> dataSourceCommonProps = PropertyUtil.handle(environment, COMMON_PREFIX, Map.class);
           for (String each : getDataSourceNames(environment, PREFIX)) {
               try {
                   result.put(each, getDataSource(environment, PREFIX, each, dataSourceCommonProps));
               } catch (final ReflectiveOperationException ex) {
                   throw new ShardingSphereException("Can't find data source type.", ex);
               } catch (final NamingException ex) {
                   throw new ShardingSphereException("Can't find JNDI data source.", ex);
               }
           }
           return result;
       }
       
       private static List<String> getDataSourceNames(final Environment environment, final String prefix) {
           StandardEnvironment standardEnv = (StandardEnvironment) environment;
           standardEnv.setIgnoreUnresolvableNestedPlaceholders(true);
           String dataSourceNames = standardEnv.getProperty(prefix + DATA_SOURCE_NAME);
           if (StringUtils.isEmpty(dataSourceNames)) {
               dataSourceNames = standardEnv.getProperty(prefix + DATA_SOURCE_NAMES);
           }
           return new InlineExpressionParser(dataSourceNames).splitAndEvaluate();
       }
       
       @SuppressWarnings("unchecked")
       private static DataSource getDataSource(final Environment environment, final String prefix, final String dataSourceName,
                                               final Map<String, Object> dataSourceCommonProps) throws ReflectiveOperationException, NamingException {
           Map<String, Object> dataSourceProps = mergedDataSourceProps(PropertyUtil.handle(environment, prefix + dataSourceName.trim(), Map.class), dataSourceCommonProps);
           Preconditions.checkState(!dataSourceProps.isEmpty(), String.format("Wrong datasource [%s] properties.", dataSourceName));
           if (dataSourceProps.containsKey(JNDI_NAME)) {
               return getJNDIDataSource(dataSourceProps.get(JNDI_NAME).toString());
           }
           DataSource result = DataSourceUtil.getDataSource(dataSourceProps.get(DATA_SOURCE_TYPE).toString(), dataSourceProps);
           DataSourcePropertiesSetterHolder.getDataSourcePropertiesSetterByType(dataSourceProps.get(DATA_SOURCE_TYPE).toString()).ifPresent(
               propsSetter -> propsSetter.propertiesSet(environment, prefix, dataSourceName, result));
           return result;
       }
       
       private static Map<String, Object> mergedDataSourceProps(final Map<String, Object> dataSourceProps, final Map<String, Object> dataSourceCommonProps) {
           if (!dataSourceCommonProps.isEmpty()) {
               dataSourceCommonProps.putAll(dataSourceProps);
               return dataSourceCommonProps;
           } else {
               return dataSourceProps;
           }
       }
       
       private static DataSource getJNDIDataSource(final String jndiName) throws NamingException {
           JndiObjectFactoryBean bean = new JndiObjectFactoryBean();
           bean.setResourceRef(true);
           bean.setJndiName(jndiName);
           bean.setProxyInterface(DataSource.class);
           bean.afterPropertiesSet();
           return (DataSource) bean.getObject();
       }
   }
   
   ```
   
   I want to change version to 4.1.1,because my project is will be deploy soon,I can't delay;
   this is why I update version to 5.0.0 #8416 ;
   when I have some time,I will continue find the reason


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737638876


   > @fyuan1030 you can not use `mybatis-spring-boot-starter` .
   
   because the spring-boot-starter-jdbc ? I can exclusion it and try again


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737702954


   > @yu199195 Can you have a look?
   
   yeah I have looked these two issue;both of them as they depends on `druid-spring-boot-starter`;I use druid rather than `druid-spring-boot-starter`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737632349


   Hi, please fill in the template.
   ```
   
   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ### Expected behavior
   
   ### Actual behavior
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737710743


   > https://shardingsphere.apache.org/document/legacy/4.x/document/en/overview/
   
   OK OK。3q,I will try it


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] yu199195 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
yu199195 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737706907


   @fyuan1030 if you use 4.1.1 , you see https://shardingsphere.apache.org/document/legacy/4.x/document/en/overview/ 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737648289


   > @fyuan1030 Please refer to #5929 , maybe it can help.
   
   yeah,I noticed it,when I use version 4.1.1,I depends on druid rather than druid-starter


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737638093


   > @fyuan1030 you can not use `mybatis-spring-boot-starter` .
   
   
   
   > Hi, please fill in the template.
   > 
   > ```
   > 
   > ## Bug Report
   > 
   > **For English only**, other languages will not accept.
   > 
   > Before report a bug, make sure you have:
   > 
   > - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   > - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   > 
   > Please pay attention on issues you submitted, because we maybe need more details. 
   > If no response anymore and we cannot reproduce it on current information, we will **close it**.
   > 
   > Please answer these questions before submitting your issue. Thanks!
   > 
   > ### Which version of ShardingSphere did you use?
   > 
   > ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   > 
   > ### Expected behavior
   > 
   > ### Actual behavior
   > 
   > ### Reason analyze (If you can)
   > 
   > ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   > 
   > ### Example codes for reproduce this issue (such as a github link).
   > ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737638419


   > Hi, please fill in the template.
   > 
   > ```
   > 
   > ## Bug Report
   > 
   > **For English only**, other languages will not accept.
   > 
   > Before report a bug, make sure you have:
   > 
   > - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   > - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   > 
   > Please pay attention on issues you submitted, because we maybe need more details. 
   > If no response anymore and we cannot reproduce it on current information, we will **close it**.
   > 
   > Please answer these questions before submitting your issue. Thanks!
   > 
   > ### Which version of ShardingSphere did you use?
   > 
   > ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   > 
   > ### Expected behavior
   > 
   > ### Actual behavior
   > 
   > ### Reason analyze (If you can)
   > 
   > ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   > 
   > ### Example codes for reproduce this issue (such as a github link).
   > ```
   
   ok I will do it next time if I find another question in some days


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] fyuan1030 edited a comment on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
fyuan1030 edited a comment on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737640207


   > @fyuan1030 can you show shardingsphere config?
   
   ```
   spring:
     shardingsphere:
       datasource:
         name: databasename
         databasename:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: com.mysql.jdbc.Driver
           ……
           ……
   ```
   I think these are enough。if anything else you need please tell me;i will try it
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737646413


   @fyuan1030  Please refer to https://github.com/apache/shardingsphere/issues/5929 , maybe it can help.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu closed issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 commented on issue #8475: how to deal with the conflict about starter

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #8475:
URL: https://github.com/apache/shardingsphere/issues/8475#issuecomment-737667814


   Get it. Is the problem resolved now? 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org