Printemps de Démarrage de l'Application n'a pas pu démarrer avec classpath
Quelle belle journée, n'est-ce pas?
J'espère que quelqu'un de cette communauté peut m'aider.
Version De Tomcat 7,
Servlet API 3.0
Je voudrais commencer ma Printemps de Démarrage projet dans un tomcat à l'aide d'un .guerre. Voilà mon code de printemps de démarrage de l'application:
Principal De La Classe
@Configuration
@EnableAutoConfiguration
@ComponentScan(basePackages = "com.###.dashboard")
@EnableJpaRepositories
@EntityScan(basePackages = "com.###.dashboard.domain")
public class Dashboard extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(new Object[] {Dashboard.class}, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Dashboard.class);
}
}
pom
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.###.dashboard</groupId>
<artifactId>Dashboard</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>Dashboard</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.1.8.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mobile</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</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-tomcat</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<properties>
<start-class>com.###.dashboard.main.Dashboard</start-class>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
message d'erreur de tomcat, spring boot
2014-12-04 13:32:18.878 INFO 198588 --- [ main] .b.l.ClasspathLoggingApplicationListener : Application failed to start
with classpath: [file:/../tomcat7/webapps/dashboard/WEB-INF/classes/, ..path to libs, list of all jar files in folder libs..
2014-12-04 13:32:19.091 INFO 198588 --- [ main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.
boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@61f0fe81: startup date [Thu Dec 04 13:32:15 CET 2014]; root of
context hierarchy
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Caused by: java.lang.OutOfMemoryError: PermGen space
Où j'ai besoin de configurer le classpath? J'ai pensé que je n'ai pas besoin d'en définir un .de fichiers xml.
Merci!
- java.lang.OutOfMemoryError: PermGen space - vous devez attribuer plus de mémoire de la JVM de l'exécution de Tomcat. Recherche pour cette erreur et je suis sûr que vous trouverez la réponse
Vous devez vous connecter pour publier un commentaire.
L'une des raisons à l'origine de cette erreur est que le port a déjà été affecté à d'autres. Vous pouvez le tester en changeant d'adresse de port. Il suffit d'ajouter une application.propriétés sous répertoire de ressources. Puis ajoutez le contenu suivant
serveur.port: 9000 //vous pouvez écrire n'importe quel port que vous souhaitez