---添加事件监听测试
This commit is contained in:
@ -17,6 +17,10 @@
|
||||
<properties>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<libServerUrl>http://10.10.2.102:9500</libServerUrl>
|
||||
<libServerUser>admin</libServerUser>
|
||||
<libServerPwd>Gas@Dev123</libServerPwd>
|
||||
<ignoreUpload>false</ignoreUpload>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@ -38,14 +42,26 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<groupId>com.geg</groupId>
|
||||
<artifactId>tanuki-compiler-maven-plugin</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<libServerUrl>${libServerUrl}</libServerUrl>
|
||||
<libServerUser>${libServerUser}</libServerUser>
|
||||
<libServerPwd>${libServerPwd}</libServerPwd>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>jarupload</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package com.xjrsoft.common;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.pictc.listener.ListenerParameterContext;
|
||||
import com.pictc.listener.ListenerR;
|
||||
import com.pictc.listener.PEventListener;
|
||||
|
||||
@Component
|
||||
public class ListenerDemo {
|
||||
|
||||
@PEventListener("#source == 'lng_upload_file'")
|
||||
public ListenerR<Long> add(ListenerParameterContext context){
|
||||
Map<String,Object> data = (Map<String, Object>) context.getData();
|
||||
|
||||
return ListenerR.success(1L);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user