Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
spring boot azure存储连接字符串错误_Spring_Azure Storage - Fatal编程技术网

spring boot azure存储连接字符串错误

spring boot azure存储连接字符串错误,spring,azure-storage,Spring,Azure Storage,我使用SpringBoot2.0.2。 当我在cmd中运行应用程序spring boot时,mvn spring boot:run命令运行平稳,但是当我将它导出到war并在tomcat上使用根路径运行它时,我得到以下错误: 2018-08-22 17:21:17.312 INFO 10764 --- [ost-startStop-1] m.s.d.PriorityQueueEmailSchedulerService : Scheduled email Email{from=developerg

我使用SpringBoot2.0.2。 当我在cmd中运行应用程序spring boot时,mvn spring boot:run命令运行平稳,但是当我将它导出到war并在tomcat上使用根路径运行它时,我得到以下错误:

2018-08-22 17:21:17.312  INFO 10764 --- [ost-startStop-1] m.s.d.PriorityQueueEmailSchedulerService : Scheduled email Email{from=developerglob@gmail.com, to=[cisvapery@gmail.com], subject=Glob report buy point firetime \'2018-08-22T16:38+07:00\' and priority 1, body=, attachments=[report_buy_point pripurna bandung.csv], encoding=UTF-8} at UTC time [2018-08-22T16:38+07:00, 1] with priority {} with template
[WARN] AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'storageAzureService': Unsatisfied dependency expressed through field 'cloudStorageAccount'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.microsoft.azure.spring.autoconfigure.storage.StorageAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'azure.storage-com.microsoft.azure.spring.autoconfigure.storage.StorageProperties': Could not bind properties to 'StorageProperties' : prefix=azure.storage, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'azure.storage' to com.microsoft.azure.spring.autoconfigure.storage.StorageProperties
2018-08-22 17:21:18.183  INFO 10764 --- [ost-startStop-1] m.s.d.PriorityQueueEmailSchedulerService : Closing EmailScheduler
2018-08-22 17:21:18.185  INFO 10764 --- [ost-startStop-1] m.s.d.PriorityQueueEmailSchedulerService : Interrupting email scheduler consumer
Exception in thread "PriorityQueueEmailSchedulerService -- Consumer" org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not convert socket to TLS;
  nested exception is:
        javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. Failed messages: javax.mail.MessagingException: Could not convert socket to TLS;
  nested exception is:
        javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Could not convert socket to TLS;
  nested exception is:
        javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2155)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:752)
        at javax.mail.Service.connect(Service.java:366)
        at org.springframework.mail.javamail.JavaMailSenderImpl.connectTransport(JavaMailSenderImpl.java:515)
        at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:435)
        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:359)
        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:354)
        at it.ozimov.springboot.mail.service.defaultimpl.DefaultEmailService.send(DefaultEmailService.java:138)
        at it.ozimov.springboot.mail.service.defaultimpl.PriorityQueueEmailSchedulerService$Consumer.run(PriorityQueueEmailSchedulerService.java:443)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959)
        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:328)
        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:322)
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1614)
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052)
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:987)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
        at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:620)
        at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:547)
        at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2150)
        ... 8 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
        at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
        at sun.security.validator.Validator.validate(Validator.java:260)
        at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1596)
        ... 18 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
        at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
        at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
        at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
        ... 24 more
2018-08-22 17:21:39.400  INFO 10764 --- [ost-startStop-1] m.s.d.PriorityQueueEmailSchedulerService : Closed EmailScheduler
[INFO] LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2018-08-22 17:21:39.431  INFO 10764 --- [ost-startStop-1] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2018-08-22 17:21:39.437  INFO 10764 --- [ost-startStop-1] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
[INFO] ConditionEvaluationReportLoggingListener -

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[ERROR] LoggingFailureAnalysisReporter -
***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'azure.storage' to com.microsoft.azure.spring.autoconfigure.storage.StorageProperties:

    Property: azure.storage.connection-string
    Value: DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=globimage;AccountKey=j98PljOhAYdToMXHxFeLd5sC6afk1DMBeF8dfYETOYJU0j8AHp0Fkh3dgikoevByrkb2zCr4IwzST4HqjkBTUQ==
    Origin: class path resource [application.properties]:60:33
    Reason: HV000030: No validator could be found for constraint 'javax.validation.constraints.NotEmpty' validating type 'java.lang.String'. Check configuration for 'connectionString'

Action:

Update your application's configuration
即使应用程序属性是正确的 application.properties:

#Server konfiguration port
server.port=8087
#spring.resources.static-locations[0]=file:src/main/resources/static/
#spring.resources.static-locations[1]=classpath:/static/

#JPA Konfiguration
spring.datasource.url=jdbc:sqlserver://52.230.65.127;databaseName=globdbreview
spring.datasource.username=sa
spring.datasource.password=Develasas
spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto = update
spring.jpa.properties.hibernate.legacy_limit_handler=true

#SQL Server JPA konfiguration
spring.jpa.properties.hibernate.dialect=com.bridgetech.glob.model.SQLServerNativeDialect
spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

#default JSP
#spring.mvc.view.prefix=/WEB-INF/jsp/
#spring.mvc.view.suffix=.jsp

#Logging
logging.level.org.springframework.web=INFO

#Thymeleaf konfiguration
spring.thymeleaf.cache=false

# Specify the Lucene Directory
#spring.jpa.properties.hibernate.search.default.directory_provider = filesystem

# Using the filesystem DirectoryProvider you also have to specify the default
# base directory for all indexes 
#spring.jpa.properties.hibernate.search.default.indexBase = indexpath

#Smtp mail konfiguration
spring.mail.default-encoding=UTF-8
spring.mail.host=smtp.gmail.com
spring.mail.username=developerglobsa@gmail.com
spring.mail.password=@asdadsadsa
spring.mail.port=587
spring.mail.protocol=smtp
spring.mail.test-connection=false
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true

#upload file
#spring.servlet.multipart.max-file-size=50mb
#spring.servlet.multipart.max-request-size=50mb

spring.mail.scheduler.enabled=true
spring.mail.scheduler.priorityLevels=5

spring.mail.scheduler.persistence.enabled=false
spring.mail.scheduler.persistence.redis.embedded=false
spring.mail.scheduler.persistence.redis.enabled=false

#azure storage
azure.storage.connection-string=DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=globim;AccountKey=j98PljOhAYdToMXHxFeLd5sC6afk1DMBeF8dfYETOYJU0j8AHp0Fkh3dgik
StorageAzureService:

@Service
public class StorageAzureService {

    @Autowired
    private CloudStorageAccount cloudStorageAccount;

    public static final String storageConnectionString = "DefaultEndpointsProtocol=[http|https];EndpointSuffix=core.windows.net;AccountName=globimage;AccountKey=j98PljOhAYdToMXHxFeLd5sC6afk1DMBeF8dfYETOYJU0j8AHp0Fkh3dgikoevByrkb2zCr4IwzST4HqjkBTUQ==";

    final String containerName = "image";

    public StorageAzureService() {
//      try {
//          cloudStorageAccount = CloudStorageAccount.parse(storageConnectionString);
//      } catch (InvalidKeyException e) {
//          // TODO Auto-generated catch block
//          e.printStackTrace();
//      } catch (URISyntaxException e) {
//          // TODO Auto-generated catch block
//          e.printStackTrace();
//      }
        // TODO Auto-generated constructor stub
    }

    public void createContainerIfNotExists() {
        try {
            // Create a blob client.
            final CloudBlobClient blobClient = cloudStorageAccount.createCloudBlobClient();
            // Get a reference to a container. (Name must be lower case.)
            final CloudBlobContainer container = blobClient.getContainerReference(containerName);
            // Create the container if it does not exist.
            if (container.createIfNotExists()) {
                System.out.println("True: " + containerName);
            } else {
                System.out.println("False: " + containerName);
            }
        } catch (Exception e) {
            // Output the stack trace.
            e.printStackTrace();
        }
    }

    public String uploadTextBlob(MultipartFile file, String fileName) {
        try {

            // Create a blob client.
            final CloudBlobClient blobClient = cloudStorageAccount.createCloudBlobClient();
            // Get a reference to a container. (Name must be lower case.)
            final CloudBlobContainer container = blobClient.getContainerReference(containerName);
            // Get a blob reference for a text file.
            CloudBlockBlob blob = container.getBlockBlobReference(fileName);
            // Upload some text into the blob.
            blob.upload(file.getInputStream(), file.getSize());
            System.out.println("success upload." + blob.getUri().toString());
            return blob.getUri().toString();
        } catch (Exception e) {
            // Output the stack trace.
            e.printStackTrace();
        }
        return null;
    }

    public void deleteTextBlob(String fileName) {
        try {
            if (fileName.startsWith("https://globimage.blob.core.windows.net/glob-images/")) {
                System.out.println("True: https://globimage.blob.core.windows.net/glob-images/");
                String fileNameImgGlob = fileName.substring(52);
                // Create a blob client.
                final CloudBlobClient blobClient = cloudStorageAccount.createCloudBlobClient();
                // Get a reference to a container. (Name must be lower case.)
                final CloudBlobContainer container = blobClient.getContainerReference(containerName);
                // Get a blob reference for a text file.
                CloudBlockBlob blob = container.getBlockBlobReference(fileNameImgGlob);
                // Upload some text into the blob.
                if (blob.exists()) {
                    blob.deleteIfExists();
                    System.out.println("success delete." + blob.getUri().toString());
                } else {
                    System.out.println("file not found.");
                }
            }
        } catch (Exception e) {
            // Output the stack trace.
            e.printStackTrace();
        }
    }

    public void deleteShareFile() {

        try {

            // Create the file client.
            CloudFileClient fileClient = cloudStorageAccount.createCloudFileClient();

            // Get a reference to the file share
            CloudFileShare share = fileClient.getShareReference("sampleshare");

            if (share.deleteIfExists()) {
                System.out.println("sampleshare deleted");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    public void createDirectory() {

        try {
            // Create the file client.
            CloudFileClient fileClient = cloudStorageAccount.createCloudFileClient();

            // Get a reference to the file share
            CloudFileShare share = fileClient.getShareReference("sampleshare");

            // Get a reference to the root directory for the share.
            CloudFileDirectory rootDir = share.getRootDirectoryReference();

            // Get a reference to the sampledir directory
            CloudFileDirectory sampleDir = rootDir.getDirectoryReference("sampledir");

            if (sampleDir.createIfNotExists()) {
                System.out.println("sampledir created");
            } else {
                System.out.println("sampledir already exists");
            }
        } catch (Exception e) {
            // TODO: handle exception
        }

    }

    public void deleteDirectory() {
        try {
            // Create the file client.
            CloudFileClient fileClient = cloudStorageAccount.createCloudFileClient();

            // Get a reference to the file share
            CloudFileShare share = fileClient.getShareReference("sampleshare");

            // Get a reference to the root directory for the share.
            CloudFileDirectory rootDir = share.getRootDirectoryReference();

            // Get a reference to the directory you want to delete
            CloudFileDirectory containerDir = rootDir.getDirectoryReference("sampledir");

            // Delete the directory
            if (containerDir.deleteIfExists()) {
                System.out.println("Directory deleted");
            }
        } catch (Exception e) {
            // TODO: handle exception
        }
    }

    public void listFilesAndDirectories() {
        try {
            // Create the file client.
            CloudFileClient fileClient = cloudStorageAccount.createCloudFileClient();

            // Get a reference to the file share
            CloudFileShare share = fileClient.getShareReference(containerName);
            // Get a reference to the root directory for the share.
            CloudFileDirectory rootDir = share.getRootDirectoryReference();

            for (ListFileItem fileItem : rootDir.listFilesAndDirectories()) {
                System.out.println(fileItem.getUri());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void uploadFile() {
        try {
            // Create the file client.
            CloudFileClient fileClient = cloudStorageAccount.createCloudFileClient();

            // Get a reference to the file share
            CloudFileShare share = fileClient.getShareReference("share-images");

            if (share.createIfNotExists()) {
                System.out.println("New share created");
            }

            // Get a reference to the root directory for the share.
            CloudFileDirectory rootDir = share.getRootDirectoryReference();

            // Define the path to a local file.
            final String filePath = "D:\\uploads\\my.jpg";

            CloudFile cloudFile = rootDir.getFileReference("my.jpg");
            cloudFile.uploadFromFile(filePath);
        } catch (Exception e) {
            // TODO: handle exception
            System.out.println(e.getMessage());
        }
    }

    public void downloadFile() {
        try {
            // Create the file client.
            CloudFileClient fileClient = cloudStorageAccount.createCloudFileClient();

            // Get a reference to the file share
            CloudFileShare share = fileClient.getShareReference("sampleshare");

            // Get a reference to the root directory for the share.
            CloudFileDirectory rootDir = share.getRootDirectoryReference();

            // Get a reference to the directory that contains the file
            CloudFileDirectory sampleDir = rootDir.getDirectoryReference("sampledir");

            // Get a reference to the file you want to download
            CloudFile file = sampleDir.getFileReference("SampleFile.txt");

            // Write the contents of the file to the console.
            System.out.println(file.downloadText());
        } catch (Exception e) {
            // TODO: handle exception
        }
    }

    public void deleteFile2() {
        try {
            // Create the file client.
            CloudFileClient fileClient = cloudStorageAccount.createCloudFileClient();

            // Get a reference to the file share
            CloudFileShare share = fileClient.getShareReference("sampleshare");

            // Get a reference to the root directory for the share.
            CloudFileDirectory rootDir = share.getRootDirectoryReference();

            // Get a reference to the directory where the file to be deleted is in
            CloudFileDirectory containerDir = rootDir.getDirectoryReference("sampledir");

            String filename = "SampleFile.txt";
            CloudFile file;

            file = containerDir.getFileReference(filename);
            if (file.deleteIfExists()) {
                System.out.println(filename + " was deleted");
            }
        } catch (Exception e) {
            // TODO: handle exception
        }
    }

}
全球应用:

@ComponentScan(basePackages = "com.bridgetech.glob")
@SpringBootApplication
@EnableEmailTools
public class GlobApplication
//implements ApplicationContextAware
{

    @Autowired
    EmailSenderService emailSenderService;
//  
//  private ApplicationContext applicationContext;

    @Bean
    WebMvcConfigurer configurer() {
        return new WebMvcConfigurer() {
            @Override
            public void addResourceHandlers(ResourceHandlerRegistry registry) {
                registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
            }
        };
    }

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

//  @Override
//  public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
//      this.applicationContext = applicationContext;
//  }
//
    @PostConstruct
    public void sendEmail() throws UnsupportedEncodingException, InterruptedException, CannotSendEmailException, URISyntaxException {
        emailSenderService.scheduleSixEmails(1);

//      close();
    }

//  private void close() {
//      TimerTask shutdownTask = new TimerTask() {
//          @Override
//          public void run() {
//              ((AbstractApplicationContext) applicationContext).close();
//          }
//      };
//      Timer shutdownTimer = new Timer();
//      shutdownTimer.schedule(shutdownTask, TimeUnit.SECONDS.toMillis(20));
//  }

}
pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>com.bridgetech</groupId>
    <artifactId>glob</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>glob</name>
    <description>Demo project for Spring Boot</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.2.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <azure.version>2.0.4</azure.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.microsoft.azure</groupId>
                <artifactId>azure-spring-boot-bom</artifactId>
                <version>${azure.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-storage-spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20180130</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> 
            <scope>runtime</scope> </dependency> -->
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.3</version>
        </dependency>


        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>

        <dependency>
            <groupId>com.icegreen</groupId>
            <artifactId>greenmail</artifactId>
            <version>1.5.5</version>
            <scope>test</scope>
        </dependency>

        <!-- bootstrap and jquery -->
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>bootstrap</artifactId>
            <version>3.3.7</version>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>jquery</artifactId>
            <version>3.2.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.17</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.lowagie/itext -->
        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <version>2.1.7</version>
        </dependency>

        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>eclipselink</artifactId>
            <version>2.7.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.itextpdf/itextpdf -->
        <dependency>
            <groupId>com.itextpdf</groupId>
            <artifactId>itextpdf</artifactId>
            <version>5.5.13</version>
        </dependency>

        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20160810</version>
        </dependency>

        <dependency>
            <groupId>com.google.firebase</groupId>
            <artifactId>firebase-admin</artifactId>
            <version>5.9.0</version>
        </dependency>

        <dependency>
            <groupId>it.ozimov</groupId>
            <artifactId>spring-boot-email-core</artifactId>
            <version>0.6.3</version>
        </dependency>

        <dependency>
            <groupId>it.ozimov</groupId>
            <artifactId>spring-boot-freemarker-email</artifactId>
            <version>0.6.3</version>
        </dependency>

        <!-- <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency> -->
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <nonFilteredFileExtensions>
                        <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
                        <nonFilteredFileExtension>woff</nonFilteredFileExtension>
                        <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
                    </nonFilteredFileExtensions>
                </configuration>
            </plugin>

        </plugins>
    </build>


</project>

4.0.0
com.bridgetech
地球仪
0.0.1-快照
战争
地球仪
SpringBoot的演示项目
org.springframework.boot
spring启动程序父级
2.0.2.1发布
UTF-8
UTF-8
1.8
2.0.4
com.microsoft.azure
azure spring引导bom
${azure.version}
聚甲醛
进口
com.microsoft.azure
azure存储春季启动程序
org.json
json
20180130
org.springframework.boot
弹簧靴起动器执行器
org.springframework.boot
spring引导启动器数据jpa
org.springframework.boot
SpringBootStarterWeb
com.microsoft.sqlserver
mssql jdbc
运行时
org.springframework.boot
弹簧启动机tomcat
假如
org.springframework.boot
弹簧起动试验
测试
javax.servlet
jstl
org.apache.tomcat.embed
汤姆卡特·贾斯珀
假如
org.springframework.boot
弹簧启动安全
org.springframework.boot
弹簧启动装置
org.hibernate.validator
休眠验证器
公地小海狸
公地小海狸
1.9.3
org.springframework.boot
春季启动邮件
冰绿
绿色邮件
1.5.5
测试
org.webjars
独自创立
3.3.7
org.webjars
jquery
3.2.1
org.apache.poi
poi
3.17
com.lowagie
文字
2.1.7
javax.xml.bind
jaxb api
org.eclipse.persistence
日食
2.7.0
org.springframework
SpringWebMVC
org.apache.commons
commons-lang3
com.itextpdf
itextpdf
5.5.13
org.json
json
20160810
com.google.firebase
firebase管理员
5.9.0
是奥齐莫夫
spring引导电子邮件核心
0.6.3
是奥齐莫夫
spring boot freemarker电子邮件
0.6.3
org.springframework.boot
springbootmaven插件
org.apache.maven.plugins
maven资源插件
ttf
沃夫
沃夫2

如何解决此问题,谢谢

您错过了在application.properties中添加以下必需属性

azure.storage.accountName = 
azure.storage.accountKey = 
    <dependency>
        <groupId>com.azure.spring</groupId>
        <artifactId>azure-spring-boot-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>com.azure.spring</groupId>
        <artifactId>azure-spring-boot-starter-storage</artifactId>
    </dependency>
    <dependency>
如果在项目中使用以下依赖项,则需要包含上述属性

azure.storage.accountName = 
azure.storage.accountKey = 
    <dependency>
        <groupId>com.azure.spring</groupId>
        <artifactId>azure-spring-boot-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>com.azure.spring</groupId>
        <artifactId>azure-spring-boot-starter-storage</artifactId>
    </dependency>
    <dependency>

com.azure.spring

我应该编辑什么Application.properties:#azure存储azure.storage.connection string=DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=glob;AccountKey=J98PLJOHAYDTOMXHELD5SC6AFK1MBEF8DFYETOYJ8AHP0FKH3DGIKOEVYRKB2ZCR4IWZST