fix: 修改扫码枪监听只在生产环境中启用
This commit is contained in:
parent
3b7e924478
commit
0218a7548a
@ -5,6 +5,7 @@ import com.github.kwhat.jnativehook.NativeHookException;
|
|||||||
import com.github.kwhat.jnativehook.keyboard.NativeKeyEvent;
|
import com.github.kwhat.jnativehook.keyboard.NativeKeyEvent;
|
||||||
import com.github.kwhat.jnativehook.keyboard.NativeKeyListener;
|
import com.github.kwhat.jnativehook.keyboard.NativeKeyListener;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.context.annotation.Profile;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -19,6 +20,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@Log4j2
|
@Log4j2
|
||||||
@Component
|
@Component
|
||||||
|
@Profile("prod")
|
||||||
public class GlobalKeyListenerExample implements NativeKeyListener {
|
public class GlobalKeyListenerExample implements NativeKeyListener {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
Loading…
Reference in New Issue
Block a user