Giter Club home page Giter Club logo

azure-spring-boot's Introduction

Azure Spring Boot

The Spring modules in this repo are moved to Azure Java SDK repo.

Spring Cloud Azure 4.x has been GAed and it brings much more consistent experience, check this reference doc for more details.

We will continue to respond to open issues here, new issues should be reported on Azure Java SDK repo.

Thank you for your patience. We look forward to continuing to work together with you.

Below are the new locations for Spring modules

Module name New module name Has been deprecated Description
azure-active-directory-b2c-spring-boot-starter spring-cloud-azure-starter-active-directory-b2c No
azure-active-directory-spring-boot-starter spring-cloud-azure-starter-active-directory No
azure-spring-boot-starter-cosmos spring-cloud-azure-starter-data-cosmos No
azure-keyvault-secrets-spring-boot-starter spring-cloud-azure-starter-keyvault-secrets No
azure-servicebus-jms-spring-boot-starter spring-cloud-azure-starter-servicebus-jms No
azure-spring-boot-starter-storage spring-cloud-azure-starter-storage-blob No
azure-spring-boot-metrics-starter N/A Yes
spring-data-gremlin-boot-starter N/A Yes Vote this issue if you want it be supported.

azure-spring-boot's People

Contributors

antonmry avatar chenrujun avatar dhaval24 avatar eddumelendez avatar incarnation-p-lee avatar jdubois avatar jialindai avatar kventil avatar lhanson avatar matthew-dong avatar microsoftopensource avatar mjeffries-pivotal avatar mnriem avatar msftgits avatar patfrat avatar patrick246 avatar rajadilipkolli avatar ramya25 avatar saragluna avatar shichaoqiu avatar snicoll avatar sophiaso avatar superrdean avatar swagata-chaudhuri-infosys avatar vchernogorov avatar wmitzel-airplus avatar yaweiw avatar yiliuto avatar yungezz avatar zhijunzhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-spring-boot's Issues

Custom functions in Spring Data support

We can create custom functions in Spring Data's Repository e.g. List<User> findUserByFirstName(String firstName), which is a key feature of Spring Data. Can we implement such feature in our DocumentDB starter?

documentdb javadoc warning

cd azure-spring-boot-starters\documentdb\spring-data-azure-documentdb
mvn package

There will be below warnings.

[WARNING] Javadoc Warnings
[WARNING] D:\azure-spring-boot-starters\documentdb\spring-data-azure-documentdb\src\main\java\com\microsoft\azure\spring\data\documentdb\core\mapping\BasicDocumentDbPersistentProperty.java:36: warning - @propertyDescription is an unknown tag.
[WARNING] D:\azure-spring-boot-starters\documentdb\spring-data-azure-documentdb\src\main\java\com\microsoft\azure\spring\data\documentdb\core\mapping\BasicDocumentDbPersistentProperty.java:36: warning - Tags @propertyGetter, @propertySetter and @propertyDescription can only be used in JavaFX properties getters and setters.
[WARNING] D:\azure-spring-boot-starters\documentdb\spring-data-azure-documentdb\src\main\java\com\microsoft\azure\spring\data\documentdb\core\mapping\BasicDocumentDbPersistentProperty.java:36: warning - Tags @propertyGetter, @propertySetter and @propertyDescription can only be used in JavaFX properties getters and setters.
[WARNING] D:\azure-spring-boot-starters\documentdb\spring-data-azure-documentdb\src\main\java\com\microsoft\azure\spring\data\documentdb\core\mapping\BasicDocumentDbPersistentProperty.java:36: warning - @propertyDescription is an unknown tag.
[WARNING] D:\azure-spring-boot-starters\documentdb\spring-data-azure-documentdb\src\main\java\com\microsoft\azure\spring\data\documentdb\core\mapping\BasicDocumentDbPersistentProperty.java:36: warning - Tags @propertyGetter, @propertySetter and @propertyDescription can only be used in JavaFX properties getters and setters.
[WARNING] D:\azure-spring-boot-starters\documentdb\spring-data-azure-documentdb\src\main\java\com\microsoft\azure\spring\data\documentdb\core\mapping\BasicDocumentDbPersistentProperty.java:36: warning - Tags @propertyGetter, @propertySetter and @propertyDescription can only be used in JavaFX properties getters and setters.
[WARNING] D:\azure-spring-boot-starters\documentdb\spring-data-azure-documentdb\src\main\java\com\microsoft\azure\spring\data\documentdb\core\mapping\BasicDocumentDbPersistentProperty.java:36: warning - Tags @propertyGetter, @propertySetter and @propertyDescription can only be used in JavaFX properties getters and setters.
[WARNING] D:\azure-spring-boot-starters\documentdb\spring-data-azure-documentdb\src\main\java\com\microsoft\azure\spring\data\documentdb\core\mapping\BasicDocumentDbPersistentProperty.java:36: warning - Tags @propertyGetter, @propertySetter and @propertyDescription can only be used in JavaFX properties getters and setters.

Consider moving auto-configuration codes to `azure-autoconfigure`

Looking at the project, most modules bring a few classes and there are also some common concepts in azure-spring-common.

Given the surface area and the size of the project, it would be doable to move all the auto-configuration code to a single module (with optional dependencies). The starters would remain the same (and the solution 100% backward compatible).

I also think having them together should improve testing of the "platform"

If you do that, starters cloud move to azure-spring-boot-starters. See also #159

Samples should not override what spring-boot-starter-parent provides by default

The samples extends from spring-boot-starter-parent to (I suppose) reproduces what would happen with a blank app generated from start.spring.io.

If that's the intend, they shouldn't have override of maven plugin versions and dedicated pluginsManagement. IMO, this is a bit confusing because the first objective is clearly not achieved so it's not obvious why they inherit from starter-parent. Not doing that would move the checkstyle and findbugs config in the parent, making the sample more succinct and easier to apprehend.

Missing activedirectory starter?

There is no starter for the active directory integration. That's fine if you don't but currently the autoconfigure module brings a bunch of dependencies so it isn't an autoconfigure module anymore.

  1. Either that's the dependency that one is supposed to add when they want to get started with active directory and in that case I'd recommend to rename that to starter to clarify the intend
  2. Either another starter or that dependency + required dependencies should be added. I'd argue that ordering dependencies by scope makes it clearer. Right now this module brings automatically spring-web, spring-security, jackson, powermock (I guess it's missing a test scope!). The sample brings more dependencies and it isn't clear what's optional and what's required IMO

Keyvault has no configuration metadata

The keyvault Spring Boot integration defines a number of properties but they have no metadata so no IDE inspection. I see why you don't have a @ConfigurationProperties object for this feature (since adding the KeyVaultPropertySource to the Environment is happening very early) but you can write manual meta-data for those.

Spring Data compatibility with Spring Boot 2.0

Messages from Spring Data team.

We should also talk about an alignment with Spring Data Kay (the 2.0 branch effectively) as it contains quite a few API changes in the mapping context and repository APIs. Ideally you'd continue to work on the 0.x branch of yours for Boot 1.5 support as 1.5 will live for quite a bit of time due to support guarantees we provide. However, the main development will happen in 2.0 and we should make sure you have a compatible version of that available as well.

DocumentDB: Select query failed when cross partition

When I use DocumentDbRepository.findAll() method to select all entities, exception occurs:
{"message":"Cross partition query is required but disabled. Please set x-ms-documentdb-query-enablecrosspartition to true, specify x-ms-documentdb-partitionkey, or revise your query to avoid this exception."}

As docs says, the CosmosDB saves data and index them with partition keys. And when running query, the REST API requires specific the partition key or enable crosspartitionkey flag. But in the lib, it set the options to null, make the call failed.

In my thought, there should be two methods:

  1. findAll() to enable setEnableCrossPartitionQuery(true)
  2. Another method to select entities with specific partition key.

AppContext initialisation fails for subscription-only access key

The spring AppContext fails to initialize when configured for a subscription client using an access key that does not have Send access on the topic.

With the change to the TopicClient from @Scope("prototype"), the TopicClient is eagerly created, even if it is not autowired in to any beans. As such, a MessageSender is created to support the TopicClient, which results in

AuthorizationFailedException: Unauthorized access. 'Send' claim(s) are required to perform this operation.

We're having to stick with 0.1.5 until this is resolved.

findOne throws exception instead of returning null when resource not found

findOne should return null when no document is found with the given id. https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/repository/CrudRepository.html#findOne-ID-

Instead it is throwing an exception:

java.lang.RuntimeException: findById exception
	at com.microsoft.azure.spring.data.documentdb.core.DocumentDbTemplate.findById(DocumentDbTemplate.java:117)
	at com.microsoft.azure.spring.data.documentdb.repository.support.SimpleDocumentDbRepository.findOne(SimpleDocumentDbRepository.java:64)
⋮
Caused by: com.microsoft.azure.documentdb.DocumentClientException: Message: {"Errors":["Resource Not Found"]}

azure.token.acquire.timeout.seconds is wrongly namespaced

If this property is keyvault specific, it should be under the azure.keyvault namespace IMO. If it isn't, I'd still rename it as the intend of the prefix is to define an origin for the feature rather than translating the property name itself.

Pageable support in DocumentDB

I am using the following code to try pageable:

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    @Bean
    public CommandLineRunner init(UserRepository repository) {
        return (args) -> {
            repository.deleteAll();
            for (int i = 0; i < 100; i++) {
                repository.save(new User(String.valueOf(i), "firstName", "lastName"));
            }
            System.out.println(repository.findAll(new PageRequest(1, 10)));
        };
    }

}

Then I get exceptions as java.lang.UnsupportedOperationException: findAll(Pageable pageable) not supported yet..

The whole logs are:


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.6.RELEASE)

2017-08-02 15:01:55.009  INFO 19780 --- [           main] com.example.demo.DemoApplication         : Starting DemoApplication on Zhiyuan-Work with PID 19780 (C:\Users\t-zhzhe\Desktop\demo\target\classes started by t-zhzhe in C:\Users\t-zhzhe\Desktop\demo)
2017-08-02 15:01:55.014  INFO 19780 --- [           main] com.example.demo.DemoApplication         : No active profile set, falling back to default profiles: default
2017-08-02 15:01:55.152  INFO 19780 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@61009542: startup date [Wed Aug 02 15:01:55 CST 2017]; root of context hierarchy
2017-08-02 15:01:58.834  INFO 19780 --- [           main] c.m.azure.documentdb.DocumentClient      : Initializing DocumentClient with serviceEndpoint [https://spring.documents.azure.com:443/], ConnectionPolicy [ConnectionPolicy [requestTimeout=60, mediaRequestTimeout=300, connectionMode=Gateway, mediaReadMode=Buffered, maxPoolSize=100, idleConnectionTimeout=60, userAgentSuffix=;;azure-documentdb-spring-boot-starter/0.1.4;b283874abd22954131daae5647d03ae3395d9f6e753089e4837e80fdbe0c2b92, retryOptions=com.microsoft.azure.documentdb.RetryOptions@5cc69cfe, enableEndpointDiscovery=true, preferredLocations=null]], ConsistencyLevel [Session]
2017-08-02 15:02:00.978  INFO 19780 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-08-02 15:02:01.863  INFO 19780 --- [           main] c.m.a.d.internal.ServiceJNIWrapper       : Microsoft.Azure.Documents.ServiceInterop.dll exists in working directory.
2017-08-02 15:02:01.863  INFO 19780 --- [           main] c.m.a.d.internal.ServiceJNIWrapper       : DocumentDB.Spatial.Sql.dll exists in working directory.
2017-08-02 15:02:01.868  INFO 19780 --- [           main] c.m.a.d.internal.ServiceJNIWrapper       : ServiceJNI has loaded.
2017-08-02 15:02:10.069  INFO 19780 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-08-02 15:02:10.082 ERROR 19780 --- [           main] o.s.boot.SpringApplication               : Application startup failed

java.lang.IllegalStateException: Failed to execute CommandLineRunner
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:735) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:716) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:703) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:304) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at com.example.demo.DemoApplication.main(DemoApplication.java:17) [classes/:na]
Caused by: java.lang.UnsupportedOperationException: findAll(Pageable pageable) not supported yet.
	at com.microsoft.azure.spring.data.documentdb.repository.support.SimpleDocumentDbRepository.findAll(SimpleDocumentDbRepository.java:72) ~[spring-data-azure-documentdb-0.1.4.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:504) ~[spring-data-commons-1.13.6.RELEASE.jar:na]
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:489) ~[spring-data-commons-1.13.6.RELEASE.jar:na]
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:461) ~[spring-data-commons-1.13.6.RELEASE.jar:na]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:56) ~[spring-data-commons-1.13.6.RELEASE.jar:na]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:57) ~[spring-data-commons-1.13.6.RELEASE.jar:na]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) ~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at com.sun.proxy.$Proxy47.findAll(Unknown Source) ~[na:na]
	at com.example.demo.DemoApplication.lambda$init$0(DemoApplication.java:28) [classes/:na]
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:732) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	... 6 common frames omitted

2017-08-02 15:02:10.083  INFO 19780 --- [           main] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@61009542: startup date [Wed Aug 02 15:01:55 CST 2017]; root of context hierarchy
2017-08-02 15:02:10.086  INFO 19780 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

Use github labels

It would be better if GitHub labels are assigned to each Issue and pull request so that it will be easier to filter

mvn build failure in submodule folder due to no config/java.header

e:\javasrc\azure-spring-boot-starters\azure-documentdb-spring-boot-starter-sample>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Azure Document DB Spring Boot Starter Sample 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ azure-documentdb-spring-boot-starter-sample ---
[INFO] Deleting e:\javasrc\azure-spring-boot-starters\azure-documentdb-spring-boot-starter-sample\target
[INFO]
[INFO] --- maven-checkstyle-plugin:2.17:check (validate) @ azure-documentdb-spring-boot-starter-sample ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.263 s
[INFO] Finished at: 2017-07-24T18:16:58+08:00
[INFO] Final Memory: 20M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (validate) on project azure-documentdb-spring-boot-starter-sample: Failed during checkstyle configuration: cannot initialize module Header - Unable to find: config/java.header -> [Help 1]

Add Microsoft librarires to bom

Relates to #128

The essence of the bom is to provide dependency management for "your own modules". Strictly speaking, the starters and artifacts that are managed here. However, it is clear you have the authority of having an opinion about Azure related jars as well (since that decision doesn't exist elsewhere).

I think it would help users if artifacts such as adal4j, azure-keyvault, azure-storage, azure-media, azure-servicebus were added. To some extend I'd assume that dependency management for spring-social-microsoft-graph and spring-data-azure-document-db.

If this is accepted, the artifactId of the boml has to change as azure-spring-boot-starters-bom does not reflect the goal anymore. Spring should definitely be there as the bom provides dependency management for the Spring Support. Perhaps something like azure-spring-boot-bom would be better?

If we extend that though a bit, this repository could become the place for Spring Boot support for Azure. Maybe azure-spring-boot would therefore a better name for this repository?

auto configuration optional dependencies

errors from maven-javadoc-plugin plugin

[ERROR] MavenInvocationException: Error when invoking Maven, consult the invoker log file: D:\azure-spring-boot-starters\azure-mediaservices-spring-boot-starter-sample\target\invoker\maven-javadoc-plugin1034693639.txt
[WARNING] Creating fake javadoc directory to prevent repeated invocations: D:\azure-spring-boot-starters\azure-mediaservices-spring-boot-starter\target\apidocs
[ERROR] Error fetching link: D:\azure-spring-boot-starters\azure-mediaservices-spring-boot-starter\target\apidocs/package-list. Ignored it.

Move spring-data-azure-documentdb to a separate GIthub repository

The Spring Data integration for DocumentDB is not tied to the Spring Boot support and should have a different release cycle.

Release should match a Spring Data release train so maintenance branches would have a different lifecycle as well.

I'd argue that the auto-configuration should be kept here, in azure-autoconfigure if #158 is accepted

Library "ListBlobItem" Automatically Import

github issue
When I type the above-mentioned code in VS code, the requisite library "com.microsoft.azure.storage.blob.ListBlobItem" can not be imported automatically. Why not remind the learners with a small tip here. In another way, can we merge the imports as below.
Original:
wechat image_20170802150853
Modified:
wechat image_20170802150921

Consider moving samples to a shared location

Relates to #132

There is some noise in each starter currently:

  1. Most if not all properties (the two maven one can be replaced by java.version btw)
  2. licenses
  3. developers
  4. scm
  5. dependencyManagement
  6. The checkstyle, findbugs and spring-boot plugin (As for the latter, we already discussed that it's a duplication since you inherit from Spring Boot's parent).

You could have a azure-samples root directory with all the samples in them. That way they are easier to find and you can move that noise to the parent.

Rename `azure-support` to `azure-spring-boot`

The current name doesn't feel right (it doesn't matter how the entry is going the be named ultimately).

I thought we'd agree on moving all the code in that module. Again, please do not design the module based on the entries on start.spring.io as it is totally unrelated IMO.

All the code should move there and the starters should have no code.

Also, I'd change the spring.boot.autoconfigure package to spring.autoconfigure

BOM should not provide dependency management for third party libraries

It looks like you attempted to do something similar to spring-boot-dependencies which is the BOM of a "platform" (with stronger semantics). This project is more narrowed and its bom should only expose dependency management for the artifacts that the project produces (so in this case, azure artifacts). It should not have an opinion about third party dependencies (otherwise including that BOM in a project potentially overrides decisions that were made about them)

For versions that match the version of the project (everything in an ideal world except maybe Microsoft-specific jars that the starters require), I'd set them explicitly rather than using ${bom.version}. If you're including the bom for Azure X.Y.Z, it should be X.Y.Z. and nothing else (Maven does not allow to override that property, which is good so it's not strictly necessary but the intent is more clear if you hardcode the current version).

Here is an example of BOM for reference: http://repo.spring.io/release/org/springframework/spring-framework-bom/4.3.8.RELEASE/spring-framework-bom-4.3.8.RELEASE.pom

Exception when trying to use in a non-spring boot project

Seems the DocumentDbRepositoryFactoryBean needs a default constructor, I am trying to use in a good old spring project (4.3.10.RELEASE) I get:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.azure.spring.data.documentdb.repository.support.DocumentDbRepositoryFactoryBean]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.microsoft.azure.spring.data.documentdb.repository.support.DocumentDbRepositoryFactoryBean.()
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:85)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1147)
... 65 more
Caused by: java.lang.NoSuchMethodException: com.microsoft.azure.spring.data.documentdb.repository.support.DocumentDbRepositoryFactoryBean.()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getDeclaredConstructor(Class.java:2178)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:80)
... 66 more

Missing dependencies

I have forked latest master and when attempting to run mvn clean install I get below error. Looks like dependency was not added in parent starter , I tried to fix and publish PR but i couldn't find spring-social-microsoft-graph dependency in maven repository. Hence raising the issue.

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for com.microsoft.azure:spring-social-microsoft-graph:jar is missing. @ com.microsoft.azure:microsoft-graph-spring-boot-autoconfigure:[unknown-version], C:\Users\rajakolli\git\azure-spring-boot-starters\microsoft-graph\microsoft-graph-spring-boot-autoconfigure\pom.xml, line 61, column 21
[ERROR] 'dependencies.dependency.version' for com.microsoft.azure:microsoft-graph-spring-boot-autoconfigure:jar is missing. @ com.microsoft.azure:microsoft-graph-spring-social-starter:[unknown-version], C:\Users\rajakolli\git\azure-spring-boot-starters\microsoft-graph\microsoft-graph-spring-social-starter\pom.xml, line 46, column 21
[ERROR] 'dependencies.dependency.version' for com.microsoft.azure:microsoft-graph-spring-social-starter:jar is missing. @ line 48, column 21
 @ 
[ERROR] The build could not read 3 projects -> [Help 1]
[ERROR]   
[ERROR]   The project com.microsoft.azure:microsoft-graph-spring-boot-autoconfigure:0.1.4 (C:\Users\rajakolli\git\azure-spring-boot-starters\microsoft-graph\microsoft-graph-spring-boot-autoconfigure\pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for com.microsoft.azure:spring-social-microsoft-graph:jar is missing. @ com.microsoft.azure:microsoft-graph-spring-boot-autoconfigure:[unknown-version], C:\Users\rajakolli\git\azure-spring-boot-starters\microsoft-graph\microsoft-graph-spring-boot-autoconfigure\pom.xml, line 61, column 21
[ERROR]   
[ERROR]   The project com.microsoft.azure:microsoft-graph-spring-social-starter:0.1.4 (C:\Users\rajakolli\git\azure-spring-boot-starters\microsoft-graph\microsoft-graph-spring-social-starter\pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for com.microsoft.azure:microsoft-graph-spring-boot-autoconfigure:jar is missing. @ com.microsoft.azure:microsoft-graph-spring-social-starter:[unknown-version], C:\Users\rajakolli\git\azure-spring-boot-starters\microsoft-graph\microsoft-graph-spring-social-starter\pom.xml, line 46, column 21
[ERROR]   
[ERROR]   The project com.microsoft.azure:microsoft-graph-spring-social-starter-sample:0.0.1-SNAPSHOT (C:\Users\rajakolli\git\azure-spring-boot-starters\microsoft-graph\microsoft-graph-spring-social-starter-sample\pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for com.microsoft.azure:microsoft-graph-spring-social-starter:jar is missing. @ line 48, column 21
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

SQL injection vulnerability

Line 191 of DocumentDbTemplate class

final String query = "SELECT * FROM root r WHERE r.id='" + dbName + "'";```

Is it vulnerable of SQL injection?

provide option to set azure-storage version in POM.xml

Provide option to set azure-storage version in POM.xml like how in spring boot we can override the default version

example if i want to use storage version 5.3.1 instead of 5.3.0

I am expecting something like below in properties tag
5.3.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.