作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
下面有一个用@SystemSetup注释的方法,但是如何触发这个方法呢?
@SystemSetup(extension = IwacockpitsConstants.EXTENSIONNAME)
public class IwaCockpitsSystemSetup{
@SystemSetup(type = SystemSetup.Type.ALL, process = SystemSetup.Process.ALL)
public void createCsCockpitUsers(){}
}
此外,还有一个官方评论:
/**
* This class is called during IwaCockpits system setup, either selecting essential or project data.
*
* The main method of this class ({@link #createCsCockpitUsers()} is responsible for creating all the IWA CSCockpit
* custom groups and their restrictions.
*/
最佳答案
实际上,Hybris 会在 update
或 init
进程中为您触发该方法(因为 process = Process.ALL
)并且创建essential
或project
数据(因为type = Type.ALL
)可以通过HAC
完成或使用 Ant
:
例如,尝试使用从HAC检查的创建基本数据来更新流程来调用该方法:
以下是应根据 @SystemSetup
输入执行该方法的不同情况。
@SystemSetup(extension = IwacockpitsConstants.EXTENSIONNAME)
public class IwaCockpitsSystemSetup{
@SystemSetup(process = SystemSetup.Process.INIT, type = SystemSetup.Type.ESSENTIAL)
public void method_1(){
//will be executed during the initialization process when the essential data for extension iwacockpits is created.
}
@SystemSetup(process = SystemSetup.Process.INIT, type = SystemSetup.Type.PROJECT)
public void method_2(){
//will be executed during the initialization process while creation of project data for extension iwacockpits.
}
@SystemSetup(process = SystemSetup.Process.UPDATE, type = SystemSetup.Type.ESSENTIAL)
public void method_3(){
//will be executed during the update process when the essential data for extension iwacockpits is created.
}
@SystemSetup(process = SystemSetup.Process.UPDATE, type = SystemSetup.Type.PROJECT)
public void method_4){
//will be executed during the initialization process when the project data for extension iwacockpits is created.
}
@SystemSetup(process = SystemSetup.Process.ALL, type = SystemSetup.Type.ALL)
public void method_5){
//will be executed during creation of project data or essential data in the same extension, in both init and update.
}
}
关于java - Hybris中如何触发注解@SystemSetup?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42465239/
下面有一个用@SystemSetup注释的方法,但是如何触发这个方法呢? @SystemSetup(extension = IwacockpitsConstants.EXTENSIONNAME) pu
我是一名优秀的程序员,十分优秀!