···Java
org.springframework.context.ApplicationContextException:
Unable to start embedded container;
-----------------------------------
nested exception is org.springframework.context.ApplicationContextException:
Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
------------------------------------------------------------------------
一 :NO Spring session store is configured
pom中有session集群配置,需要把session设置为none
application.properties数据库的配置
1:spring.session.store-type=none
设置端口:
1:server.port=8060
二:浏览器访问需要登录
设置spring security
1:security.basic.enabled=false
打包发布
父项目
run as—maven build
goals::clean package
跳过 skip tests自动化测试类跳过
查看每个文件包是否有target
因为没有jar包 需要插件
<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>
<artifactId>imocc.security.demo</artifactId>
<parent>
<groupId>com.imocc.security</groupId>
<artifactId>imocc.security</artifactId>
<version>1.1.0-SNAPSHOT</version>
<relativePath>../imocc.security</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>com.imocc.security</groupId>
<artifactId>imocc.security.browser</artifactId>
<!-- <version>1.1.0-SNAPSHOT </version> -->
<version>${imocc.security.version}</version>
</dependency>
<!-- 还可以是app -->
<!-- web项目比app多个session -->
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
</dependency>
</dependencies>
<!-- 打包设置 -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.3.3.RELEASE</version>
<executions>
<execution>
<!-- <id>attach-sources</id> -->
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>demo</finalName>
</build>
</project>
update 更新maven再打包