我有一个非常简单的具有依赖性的spring boot项目
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
Run Code Online (Sandbox Code Playgroud)
当我构建它时,web-inf文件夹在目标目录中创建,并将所有内容打包在类和lib文件夹中.
我想在web-inf的根目录下有一个xml文件("jboss-deployment-structure.xml")("web-inf/jboss-deployment-structure.xml"),我应该把它放在src中夹?
我尝试在src中创建"public/jboss-deployment-structure.xml"文件夹,但没有运气.
我有一个非常简单的Spring启动应用程序,我想部署到Jboss EAP.这是我的简单应用程序类:
@SpringBootApplication
public class MayurApplication extends SpringBootServletInitializer{
public static void main(String[] args) {
SpringApplication.run(MayurApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(applicationClass);
}
private static Class<MayurApplication> applicationClass = MayurApplication.class;
}
@RestController
class GreetingController {
@RequestMapping("/hello/{name}")
String hello(@PathVariable String name) {
return "Hello, " + name + "!";
}
}
Run Code Online (Sandbox Code Playgroud)
而我的pom.xml也非常基础.当我在Tomcat上运行这个应用程序时,使用带有spring boot的嵌入式Tomcat.只需点击一下,一切都像魅力一样.我可以访问http://localhost:8080/demo/hello/World它也有效.
现在我试图让它与Jboss EAP兼容战争,我通过从spring-boot-starter-web中排除来禁用Tomcat,并将其转换为war项目.(根据文章http://spring.io/blog/2014/03/07/deploying-spring-boot-applications的建议).
我还补充说:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>,
Run Code Online (Sandbox Code Playgroud)
因为它在抱怨.
在所有这一切之后,它编译得很好并且也创造了一场战争.当我将此战争复制到jboss部署时,我可以看到它在控制台上成功部署.但其余的api http://localhost:8080/demo/hello/World只是不起作用,并不断在浏览器上抛出错误:
JBWEB000068: message /demo/hello/World
JBWEB000069: description JBWEB000124: The requested resource is …Run Code Online (Sandbox Code Playgroud) 我的 Json 如下所示
{
name: "math",
code:null,
description:"Mathematics",
id:null,
name:"math",
noExam:null,
teacher:{
id: "57869ced78aa7da0d2ed2d92",
courseGroup:"LKG",
experties:[{type: "SOCIALSTUDIES", id: "3"}, {type: "PHYSICS", id: "4"}]
},
id:"57869ced78aa7da0d2ed2d92"
}Run Code Online (Sandbox Code Playgroud)
如果你看到我的实体类,我在 Teacher.java 中有一组枚举
当我尝试发布此内容时出现错误
JsonMappingException: Can not deserialize instance of com.iris.fruits.domain.enumeration.Experties out of START_OBJECT token
Run Code Online (Sandbox Code Playgroud)
我已经尝试了几乎所有的解决方案,例如DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY,但没有成功。
JsonMappingException: Can not deserialize instance of com.iris.fruits.domain.enumeration.Experties out of START_OBJECT token
Run Code Online (Sandbox Code Playgroud)
我有一个Angular项目,我正在使用morris.js.我的package.json像这样引用了morris和raphael:
dependencies{
....
"raphael": "^2.2.7",
"morris.js": "0.5.0",
....
}
Run Code Online (Sandbox Code Playgroud)
我还检查了node_module文件夹,两个依赖项都存在.在mycomponent.ts中,我这样做:
import 'morris.js';
export class mycomponent implements OnInit {
areaChart: morris.GridChart;
.....
this.areaChart = Morris.Area({
.....)}
}
Run Code Online (Sandbox Code Playgroud)
我收到错误"ERROR ReferenceError:Raphael未定义"
它正在被morris.js解雇 this.raphael = new Raphael(this.el[0]);
我应该如何在莫里斯中包括拉斐尔才能使其发挥作用?
我有一个UI网格,我想给我的行提供不同的CSS,哪个标题行为group.
在这里,我想对整行表示蓝色,这是组行,(有+符号),我也不希望在动作栏中将单元格模板应用到它.
我可以在单元格模板中做条件但是如何识别这一行.
我发现,组头行获取类'ui-grid-tree-header-row'但不确定如何使用此信息.
spring-mvc ×2
angular ×1
angularjs ×1
enums ×1
jackson ×1
java ×1
jboss ×1
jboss-eap-6 ×1
maven-3 ×1
package.json ×1
raphael ×1
set ×1
spring ×1
spring-boot ×1
webpack ×1