You need to do this if you try this command:
ssh -T [email protected]
and you get something that says
[email protected]: Permission denied (public key).
You need to do this if you try this command:
ssh -T [email protected]
and you get something that says
[email protected]: Permission denied (public key).
Suppose you have two classes that should be registered with Spring context exclusively, e.g. only one of the beans must exist in the context at any time based on some boolean property value. Of course you can do it by adding explicit if
condition into your @Configuration
class. But if the classes have no common interface it may be quite cumbersome. As an alternative you can use @ConditionalOnProperty
annotation on your classes, e.g.:
@Service
@ConditionalOnProperty(name = "use-left-service", havingValue = "true", matchIfMissing = false)
public class LeftService
/* | |
Copyright 2017 Hidetake Iwata | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
import android.content.Context; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.content.pm.PackageManager.NameNotFoundException; | |
import android.content.pm.Signature; | |
public class TamperCheck { | |
//we store the hash of the signture for a little more protection | |
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846"; |