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 2022/03/06 05:36:19 UTC

[GitHub] [shardingsphere] gagan-gv opened a new pull request #15828: Created EncryptSpringNamespaceJPAExample and configured it.

gagan-gv opened a new pull request #15828:
URL: https://github.com/apache/shardingsphere/pull/15828


   Fixes #15811
   
   Changes proposed in this pull request:
   - Created EcryptSpringNamespaceJPAExample File
   - Added Java and resources file
   - Configured the XML file
   


-- 
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@shardingsphere.apache.org

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



[GitHub] [shardingsphere] yx9o commented on a change in pull request #15828: Created EncryptSpringNamespaceJPAExample and configured it.

Posted by GitBox <gi...@apache.org>.
yx9o commented on a change in pull request #15828:
URL: https://github.com/apache/shardingsphere/pull/15828#discussion_r820228816



##########
File path: examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/pom.xml
##########
@@ -0,0 +1,38 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>encrypt-example</artifactId>
+        <version>${revision}</version>
+    </parent>
+    <artifactId>encrypt-spring-namespace-jpa-example</artifactId>
+    <name>${project.artifactId}</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core-spring-namespace</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>

Review comment:
       There should be a blank line at the end.




-- 
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@shardingsphere.apache.org

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



[GitHub] [shardingsphere] gagan-gv closed pull request #15828: Created EncryptSpringNamespaceJPAExample and configured it.

Posted by GitBox <gi...@apache.org>.
gagan-gv closed pull request #15828:
URL: https://github.com/apache/shardingsphere/pull/15828


   


-- 
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@shardingsphere.apache.org

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



[GitHub] [shardingsphere] yx9o commented on a change in pull request #15828: Created EncryptSpringNamespaceJPAExample and configured it.

Posted by GitBox <gi...@apache.org>.
yx9o commented on a change in pull request #15828:
URL: https://github.com/apache/shardingsphere/pull/15828#discussion_r820228833



##########
File path: examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/src/main/java/EncryptSpringNamespaceJPAExample.java
##########
@@ -0,0 +1,19 @@
+package org.apache.shardingsphere.example.sharding.spring.namespace.jpa;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public final class ShardingSpringNamespaceJpaExample {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-databases.xml";
+    
+    public static void main(final String[] args) throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleExecuteTemplate.run(applicationContext.getBean(ExampleService.class));
+        }
+    }
+}

Review comment:
       There should be a blank line at the end.




-- 
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@shardingsphere.apache.org

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



[GitHub] [shardingsphere] yx9o commented on a change in pull request #15828: Created EncryptSpringNamespaceJPAExample and configured it.

Posted by GitBox <gi...@apache.org>.
yx9o commented on a change in pull request #15828:
URL: https://github.com/apache/shardingsphere/pull/15828#discussion_r820229771



##########
File path: examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/pom.xml
##########
@@ -0,0 +1,38 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"

Review comment:
       `License` should be at the top of the code, you can refer to other source code.




-- 
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@shardingsphere.apache.org

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