You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/07/03 08:28:19 UTC

[GitHub] [dubbo-samples] htynkn opened a new pull request #343: [WIP] add mybatis sample

htynkn opened a new pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343


   somehow it will not trigger issue which found in 3.0.0


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] kylixs commented on a change in pull request #343: add mybatis/hibernate sample

Posted by GitBox <gi...@apache.org>.
kylixs commented on a change in pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#discussion_r665965028



##########
File path: dubbo-samples-boundary-test/dubbo-samples-hibernate/case-versions.conf
##########
@@ -0,0 +1,24 @@
+#
+#
+#   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.
+#
+
+
+# Supported component versions of the test case
+
+# Spring app
+dubbo.version=2.7.*, 3.*
+spring.version=4.*

Review comment:
       Not only test Spring 4.x, this example should have no special Spring version requirements and can use the wildcard *
   ```
   spring.version=*
   ```




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] AlbumenJ merged pull request #343: add mybatis/hibernate sample

Posted by GitBox <gi...@apache.org>.
AlbumenJ merged pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] htynkn commented on pull request #343: [WIP] add mybatis sample

Posted by GitBox <gi...@apache.org>.
htynkn commented on pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#issuecomment-876181819


   > It is recommended to move the `dubbo-samples-mybatis` project to the root directory
   
   
   
   > It is recommended to move the `dubbo-samples-mybatis` project to the root directory
   
   the purpose for this mybatis project is to verify dubbo works well with mybatis. (I'm trying to add a hibernate demo too).
   this is more like a test to verify function.
   
   It doesn't use any new dubbo feature and it's also not a suggested best practice. that's why I put it in `dubbo-samples-boundary-test` folder


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] kylixs commented on pull request #343: add mybatis/hibernate sample

Posted by GitBox <gi...@apache.org>.
kylixs commented on pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#issuecomment-876222952


   > It doesn't use any new dubbo feature and it's also not a suggested best practice. that's why I put it in dubbo-samples-boundary-test folder 
   
   If this is the purpose, I prefer to change `dubbo-samples-boundary-test` to `integration-tests`
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] htynkn commented on pull request #343: add mybatis/hibernate sample

Posted by GitBox <gi...@apache.org>.
htynkn commented on pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#issuecomment-879641234


   > Use spring-boot is fine, but need change `case-versions.conf` to:
   > 
   > //spring-boot 1.x
   > 
   > ```
   > dubbo.version=2.7*, 3.*
   > spring-boot.version=1.*
   > ```
   > 
   > //spring-boot 2.x
   > 
   > ```
   > dubbo.version=2.7*, 3.*
   > spring-boot.version=2.*
   > ```
   > 
   > //both spring-boot 1.x/ 2.x
   > 
   > ```
   > dubbo.version=2.7*, 3.*
   > spring-boot.version=1.*, 2.*
   > ```
   
   done.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] AlbumenJ commented on a change in pull request #343: add mybatis/hibernate sample

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on a change in pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#discussion_r666661587



##########
File path: dubbo-samples-boundary-test/dubbo-samples-hibernate/case-versions.conf
##########
@@ -0,0 +1,24 @@
+#
+#
+#   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.
+#
+
+
+# Supported component versions of the test case
+
+# Spring app
+dubbo.version=2.7.*, 3.*
+spring.version=4.*

Review comment:
       > > Not only test Spring 4.x, this example should have no special Spring version requirements and can use the wildcard *
   > > ```
   > > spring.version=*
   > > ```
   > 
   > > > It doesn't use any new dubbo feature and it's also not a suggested best practice. that's why I put it in dubbo-samples-boundary-test folder
   > > 
   > > 
   > > If this is the purpose, I prefer to change `dubbo-samples-boundary-test` to `integration-tests`
   > 
   > I'm ok with any name changing, @AlbumenJ what do you think
   
   Looks fine. BTW, it is more important to add some description of this module.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] htynkn commented on a change in pull request #343: [WIP] add mybatis sample

Posted by GitBox <gi...@apache.org>.
htynkn commented on a change in pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#discussion_r665917950



##########
File path: dubbo-samples-boundary-test/dubbo-samples-mybatis/src/test/java/org/apache/dubbo/samples/boundary/mybatis/MybatisServiceIT.java
##########
@@ -0,0 +1,27 @@
+package org.apache.dubbo.samples.boundary.mybatis;
+
+import org.apache.dubbo.samples.boundary.mybatis.api.MybatisService;
+import org.apache.dubbo.samples.boundary.mybatis.api.User;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsNull.nullValue;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = "classpath*:spring/mybatis-consumer.xml")
+public class MybatisServiceIT {
+    @Autowired
+    private MybatisService service;
+
+    @Test
+    public void findUser() throws Exception {
+        User user = service.findByUserId(1);
+
+        assertThat(user, not(nullValue()));

Review comment:
       yeah, you are right. fixed via b996041




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] htynkn commented on a change in pull request #343: add mybatis/hibernate sample

Posted by GitBox <gi...@apache.org>.
htynkn commented on a change in pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#discussion_r666090609



##########
File path: dubbo-samples-boundary-test/dubbo-samples-hibernate/case-versions.conf
##########
@@ -0,0 +1,24 @@
+#
+#
+#   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.
+#
+
+
+# Supported component versions of the test case
+
+# Spring app
+dubbo.version=2.7.*, 3.*
+spring.version=4.*

Review comment:
       > Not only test Spring 4.x, this example should have no special Spring version requirements and can use the wildcard *
   > 
   > ```
   > spring.version=*
   > ```
   
   
   
   > > It doesn't use any new dubbo feature and it's also not a suggested best practice. that's why I put it in dubbo-samples-boundary-test folder
   > 
   > If this is the purpose, I prefer to change `dubbo-samples-boundary-test` to `integration-tests`
   
   I'm ok with any name changing, @AlbumenJ what do you think




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] kylixs commented on a change in pull request #343: [WIP] add mybatis sample

Posted by GitBox <gi...@apache.org>.
kylixs commented on a change in pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#discussion_r665366325



##########
File path: dubbo-samples-boundary-test/dubbo-samples-mybatis/src/test/java/org/apache/dubbo/samples/boundary/mybatis/MybatisServiceIT.java
##########
@@ -0,0 +1,27 @@
+package org.apache.dubbo.samples.boundary.mybatis;
+
+import org.apache.dubbo.samples.boundary.mybatis.api.MybatisService;
+import org.apache.dubbo.samples.boundary.mybatis.api.User;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsNull.nullValue;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = "classpath*:spring/mybatis-consumer.xml")
+public class MybatisServiceIT {
+    @Autowired
+    private MybatisService service;
+
+    @Test
+    public void findUser() throws Exception {
+        User user = service.findByUserId(1);
+
+        assertThat(user, not(nullValue()));

Review comment:
       It is recommended to check user.getName():
   ```
     Assert.assertEquals(user.getName(), "apache dubbo");
   ```




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] htynkn commented on a change in pull request #343: add mybatis/hibernate sample

Posted by GitBox <gi...@apache.org>.
htynkn commented on a change in pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#discussion_r666092000



##########
File path: dubbo-samples-boundary-test/dubbo-samples-hibernate/case-versions.conf
##########
@@ -0,0 +1,24 @@
+#
+#
+#   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.
+#
+
+
+# Supported component versions of the test case
+
+# Spring app
+dubbo.version=2.7.*, 3.*
+spring.version=4.*

Review comment:
       It does have version requirement for spring. for both mybatis and hibernate.
   they have different version requirement. if we need change spring version, we need modify hibernate version too.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] kylixs commented on pull request #343: add mybatis/hibernate sample

Posted by GitBox <gi...@apache.org>.
kylixs commented on pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#issuecomment-876965544


   Use spring-boot is fine, but need change `case-versions.conf` to:
   
   //spring-boot 1.x
   ```
   dubbo.version=2.7*, 3.*
   spring-boot.version=1.*
   ```
   
   //spring-boot 2.x
   ```
   dubbo.version=2.7*, 3.*
   spring-boot.version=2.*
   ```
   
   //both spring-boot 1.x/ 2.x
   ```
   dubbo.version=2.7*, 3.*
   spring-boot.version=1.*, 2.*
   ```
   
   
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org