Joke Collection Website - Public benefit messages - Q: On the secondary development of micro-eco-SMS.
Q: On the secondary development of micro-eco-SMS.
Public interface SMS service (
public boolean send SMS(String SMS id,String number,String msg);
}
Suppose it is realized like this:
The public class TestService implements SmsService{
public boolean sendSMS(String SMS id,String number,String msg){
System.out.println ("Recipient:"+number);
System.out.println ("test message:"+msg);
Return true
}
}
Then the ecosystem will call the sendSMS method in TestService when sending SMS.
2. Deploy the above realization into ecology. Just modify sms.xml, or take the above implementation as an example:
& lt module id="sms "version =" 1.0.0" >
& lt service point id = "SMS sender" interface = "weaver.sms.SMS service" >
& ltinvoke-factory & gt;
& ltconstruct class="TestService " >
& lt/construct & gt;
& lt/invoke-factory & gt;
& lt/ service point & gt
& lt/module & gt;
- Previous article:People with high emotional intelligence speak straight.
- Next article:Editing Poems Texted to Parents
- Related articles
- How do I mark my iphone as unread?
- How to open a monthly traffic package?
- Greetings to the patient's recovery.
- I didn't receive the text message until I turned it on. What happened?
- Who is here now? Help me write a composition (not copy others). The theme of the composition is "the story of Lei Feng around me", and the number of words is almost 600~800 words.
- Why did the public enemy of the black mirror delete the message?
- Is it illegal to go straight from west to east between Rong Fan Road and He Lin Street in Changchun?
- My N9 1 prompts that there is not enough memory when it is turned on, so I can't accept short messages. Which expert knows how to solve it? It almost killed me. Thank you for your help.
- How does Qianniu send contracts to customers?
- Taiyuan women and scalpers were cheated by making an appointment for HPV vaccine 1.2 million. What is the noteworthy information about this matter?