主题 : 关于jeecms前后端分离的疑问
级别: 贡士
UID: 131754
积分:405 加为好友
威望: 2 精华: 0
主题:19 回复:204
注册时间:2019-10-14
在线时长:0
61#   发表于:2019-10-22 11:14:24  IP:27.226.*.*
没有的,麻烦给我一份,谢谢
级别: 论坛管理员
UID: 122721
积分:57884 加为好友
威望: 2 精华: 1
主题:5 回复:50085
注册时间:2018-05-07
在线时长:0
62#   发表于:2019-10-22 11:21:22  IP:59.51.*.*
您稍等下  
每天告诉自己一次,“我真的很不错”。
级别: 论坛管理员
UID: 122721
积分:57884 加为好友
威望: 2 精华: 1
主题:5 回复:50085
注册时间:2018-05-07
在线时长:0
63#   发表于:2019-10-22 11:21:39  IP:59.51.*.*
能给我个邮箱吗?
每天告诉自己一次,“我真的很不错”。
级别: 贡士
UID: 131754
积分:405 加为好友
威望: 2 精华: 0
主题:19 回复:204
注册时间:2019-10-14
在线时长:0
64#   发表于:2019-10-22 11:22:51  IP:27.226.*.*
版主,启动失败每次都显示在jar包方式启动处理方法,这个地方要专门修改吗

@Configuration
@PropertySource({ "classpath:config/spring.jpa.properties" })
@ImportResource({ "classpath:config/context*.xml","classpath:config/**/context*.xml" })
@EnableAutoConfiguration(exclude = { JmxAutoConfiguration.class, ElasticsearchAutoConfiguration.class,
ElasticsearchDataAutoConfiguration.class, FreeMarkerAutoConfiguration.class})
@Import({ ContextConfig.class, WebConfig.class, WebSocketConfig.class, ThreadPoolConfiguration.class })
@EnableTransactionManagement
public class CmsFrontApplication extends SpringBootServletInitializer implements WebApplicationInitializer {

static Logger logger = LoggerFactory.getLogger(CmsFrontApplication.class);

/**
 * war方式启动的处理方法
 */

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return configureApplication(builder);
}

/**
 * jar方式启动的处理方法
 * 
 * @param args
 *            String
 * @throws Exception
 *             Exception
 */

public static void main(String[] args) throws Exception {
configureApplication(new SpringApplicationBuilder()).run(args);
}

/**
 * war方式启动和jar方式启动共用的配置
 * 
 * @param builder
 *            SpringApplicationBuilder
 */
private static SpringApplicationBuilder configureApplication(SpringApplicationBuilder builder) {
return builder.sources(CmsFrontApplication.class)
.listeners(new ApplicationListener<ApplicationEnvironmentPreparedEvent>() {
// 在应用环境准备好后执行(Application.properties和PoropertySource已读取),
// 此时BeanFactory还未准备好(Bean还未创建)
@SuppressWarnings("unused")
@Override
public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {
ConfigurableEnvironment env = event.getEnvironment();
}
});
}
级别: 贡士
UID: 131754
积分:405 加为好友
威望: 2 精华: 0
主题:19 回复:204
注册时间:2019-10-14
在线时长:0
65#   发表于:2019-10-22 11:23:28  IP:27.226.*.*
我的邮箱:1783681442@qq.com
级别: 论坛管理员
UID: 122721
积分:57884 加为好友
威望: 2 精华: 1
主题:5 回复:50085
注册时间:2018-05-07
在线时长:0
66#   发表于:2019-10-22 11:29:26  IP:59.51.*.*
发您了
每天告诉自己一次,“我真的很不错”。
级别: 贡士
UID: 131754
积分:405 加为好友
威望: 2 精华: 0
主题:19 回复:204
注册时间:2019-10-14
在线时长:0
67#   发表于:2019-10-22 11:34:18  IP:27.226.*.*
谢谢!我看下
级别: 论坛管理员
UID: 122721
积分:57884 加为好友
威望: 2 精华: 1
主题:5 回复:50085
注册时间:2018-05-07
在线时长:0
68#   发表于:2019-10-22 11:35:28  IP:59.51.*.*
好的
每天告诉自己一次,“我真的很不错”。
级别: 贡士
UID: 131754
积分:405 加为好友
威望: 2 精华: 0
主题:19 回复:204
注册时间:2019-10-14
在线时长:0
69#   发表于:2019-10-22 12:45:30  IP:27.226.*.*
版主,很不好意思,按照要求,重新来一遍,在idea运行结果报错还是一样的,在麻烦你看看

2019-10-22 12:43:19*1 [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean. 
2019-10-22 12:43:19*6 [main] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 
2019-10-22 12:43:19.563 [main] ERROR org.springframework.boot.SpringApplication - Application run failed 
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:137)
at com.jeecms.front.CmsFrontApplication.main(CmsFrontApplication.java:64)
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:206)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154)
... 7 common frames omitted

Process finished with exit code 1
级别: 贡士
UID: 131754
积分:405 加为好友
威望: 2 精华: 0
主题:19 回复:204
注册时间:2019-10-14
在线时长:0
70#   发表于:2019-10-22 12:47:55  IP:27.226.*.*
主要错误在启动类

2019-10-22 12:43:19*1 [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean. 
2019-10-22 12:43:19*6 [main] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 
2019-10-22 12:43:19.563 [main] ERROR org.springframework.boot.SpringApplication - Application run failed 
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:137)
[i]at com.jeecms.front.CmsFrontApplication.main(CmsFrontApplication.java:64)[/i]
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:206)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154)
... 7 common frames omitted

Process finished with exit code 1
|< < 1 2 3 4 5 6 7 8 9 10 > >| 共10页