springboot只能一個main方法解決辦法

pom.xml修改properties,增長這行spring

<start-class>com.eshore.main.SpringBootStarter</start-class>

 或者 maven

spring-boot

<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<version>${sprint.boot.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>repackage</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

  

改爲ui

<build>  
    <plugins>  
        <plugin>  
            <groupId>org.springframework.boot</groupId>  
            <artifactId>spring-boot-maven-plugin</artifactId>  
            <configuration>  
                <mainClass>com.eshore.main.SpringBootStarter</mainClass>  
            </configuration>  
        </plugin>  
    </plugins>  
</build>
相關文章
相關標籤/搜索