Ошибка запуска проекта Spring Boot [Невозможно запустить веб-сервер] - PullRequest
1 голос
/ 09 марта 2020

я впервые использую Spring boot, используя Eclipse IDE.

, когда я запускаю проект. Появляется сообщение об ошибке, подобное этому

Unable to start web server; nested exception is .. The location [C: \ Users \ .. \ AppData \ Local \ Temp \ tomcat.xxxxxxxxxxxxxxxxxxx.8081] specified for the base directory is not a directory

Я не понимаю, как это исправить ??

this my application.properties

spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false

spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=postgres

server.port=8081

server.servlet.context-path=/api

и это мой pom. xml

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

показать ошибку вот так

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.IllegalArgumentException: The location [C:\Users\TERRES~1\AppData\Local\Temp\tomcat.8433045272296494090.8080] specified for the base directory is not a directory
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
    at com.example.webservice.SolrRedisWebserviceApplication.main(SolrRedisWebserviceApplication.java:12) ~[classes/:na]
Caused by: java.lang.IllegalArgumentException: The location [C:\Users\TERRES~1\AppData\Local\Temp\tomcat.8433045272296494090.8080] specified for the base directory is not a directory
    at org.apache.catalina.startup.Tomcat.initBaseDir(Tomcat.java:847) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
    at org.apache.catalina.startup.Tomcat.getServer(Tomcat.java:636) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
    at org.apache.catalina.startup.Tomcat.getService(Tomcat.java:569) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:182) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
    ... 8 common frames omitted
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...