谁知道哪个是靠谱发卡平台订单号获取呢?给我说说呗。

查看: 867|回复: 3
大漠插件 编译成静态模块 的变参指针怎么用?
阅读权限30
在线时间 小时
结帖率: (1/1)
&&窗口程序集名保 留&&保 留备 注大漠静态, , 公开&&&变量名类 型数组备 注 xd对象&&_初始化&当基于本类的对象被创建后,此方法会被自动调用xd.创建 (“dm.dmsoft”, )_销毁&当基于本类的对象被销毁前,此方法会被自动调用xd.清除 ()窗口_取窗口在屏幕上的位置整数型√获取窗口在屏幕上的位置 0: 失败hwnd整数型&&&指定的窗口句柄x1变体型&&&返回窗口左上角X坐标y1变体型&&&返回窗口左上角X坐标x2变体型&&&返回窗口右下角X坐标y2变体型&&&返回窗口右下角Y坐标返回 (xd.数值方法 (“GetWindowRect”, hwnd)).版本 2
.程序集 大漠静态, , 公开
.程序集变量 xd, 对象
.子程序 _初始化, , , 当基于本类的对象被创建后,此方法会被自动调用
xd.创建 (“dm.dmsoft”, )
.子程序 _销毁, , , 当基于本类的对象被销毁前,此方法会被自动调用
xd.清除 ()
.子程序 窗口_取窗口在屏幕上的位置, 整数型, 公开, 获取窗口在屏幕上的位置 0: 失败
.参数 hwnd, 整数型, , 指定的窗口句柄
.参数 x1, 变体型, , 返回窗口左上角X坐标
.参数 y1, 变体型, , 返回窗口左上角X坐标
.参数 x2, 变体型, , 返回窗口右下角X坐标
.参数 y2, 变体型, , 返回窗口右下角Y坐标
返回 (xd.数值方法 (“GetWindowRect”, hwnd))
上面是大漠插件模块的代码,调用这个模块的时候,返回值怎么写?我用的是 大漠插件5.1423。注册版,调试输出的都是0.
post_newreply
阅读权限30
在线时间 小时
结帖率: (1/1)
自己查询解决了,在要返回的参数后面的参考打上勾就行了。
阅读权限30
在线时间 小时
结帖率: (1/1)
自己查询解决了。在要返回的参数后面参考打上勾就行了。
阅读权限228
在线时间 小时
签到天数: 17 天结帖率: (2/2)
解决了就好& &公开什么别忘记了
精易论坛 - 有你更精彩 /1
一根筷子容易折,一把筷子难折断,相信团队的力量可以互补很多的不足,精易团队欢迎大家的到来
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
揭阳精易科技有限公司申明:我公司所有的培训课程版权归精易所有,任何人以任何方式翻录、盗版、破解本站培训课程,我们必将通过法律途径解决!
公司简介:揭阳市揭东区精易科技有限公司致力于易语言教学培训/易语言学习交流社区的建设与软件开发,多年来为中小企业编写过许许多多各式软件,并把多年积累的开发经验逐步录制成视频课程供学员学习,让学员全面系统化学习易语言编程,少走弯路,减少对相关技术的研究与摸索时间,从而加快了学习进度!
防范网络诈骗,远离网络犯罪
违法和不良信息举报电话,企业QQ: ,邮箱:@
Powered by
粤公网安备 25springmvc入门基础之注解和参数传递 - 克己复礼_博物致知 - ITeye技术网站
博客分类:
一、SpringMVC注解入门
1. 创建web项目2. 在springmvc的配置文件中指定注解驱动,配置扫描器
&!-- mvc的注解驱动 --&
&mvc:annotation-driven /&
&!--只要定义了扫描器,注解驱动就不需要,扫描器已经有了注解驱动的功能 --&
&context:component-scan base-package="org.study1.mvc.controller" /&
&!-- 前缀+ viewName +后缀 --&
class="org.springframework.web.servlet.view.InternalResourceViewResolver"&
&!-- WebContent(WebRoot)到某一指定的文件夹的路径 ,如下表示/WEB-INF/view/*.jsp --&
&property name="prefix" value="/WEB-INF/view/"&&/property&
&!-- 视图名称的后缀 --&
&property name="suffix" value=".jsp"&&/property&
&context:component-scan/& 扫描指定的包中的类上的注解,常用的注解有:
@Controller 声明Action组件@Service
声明Service组件
@Service("myMovieLister") @Repository 声明Dao组件@Component
泛指组件, 当不好归类时. @RequestMapping("/menu")
请求映射@Resource
用于注入,( j2ee提供的 ) 默认按名称装配,@Resource(name="beanName") @Autowired 用于注入,(srping提供的) 默认按类型装配 @Transactional( rollbackFor={Exception.class}) 事务管理@ResponseBody@Scope("prototype")
设定bean的作用
3. @controller:标识当前类是控制层的一个具体的实现4. @requestMapping:放在方法上面用来指定某个方法的路径,当它放在类上的时候相当于命名空间需要组合方法上的requestmapping来访问。
@Controller // 用来标注当前类是springmvc的控制层的类
@RequestMapping("/test") // RequestMapping表示 该控制器的唯一标识或者命名空间
public class TestController {
* 方法的返回值是ModelAndView中的
@RequestMapping("/hello.do") // 用来访问控制层的方法的注解
public String hello() {
System.out.println("springmvc annotation... ");
return "jsp1/index";
在本例中,项目部署名为mvc,tomcat url为 ,所以实际为:
在本例中,因为有命名空间 /test,所以请求hello方法地址为:http://localhost/mvc/test/hello.do
输出:springmvc annotation...
二、注解形式的参数接收
1. HttpServletRequest可以直接定义在参数的列表,通过该请求可以传递参数
url:http://localhost/mvc/test/toPerson.do?name=zhangsan
* HttpServletRequest可以直接定义在参数的列表,
@RequestMapping("/toPerson.do")
public String toPerson(HttpServletRequest request) {
String result = request.getParameter("name");
System.out.println(result);
return "jsp1/index";
可以从HttpServletRequest 取出“name”属性,然后进行操作!如上,可以取出 “name=zhangsan”
输出:zhangsan2. 在参数列表上直接定义要接收的参数名称,只要参数名称能匹配的上就能接收所传过来的数据, 可以自动转换成参数列表里面的类型,注意的是值与类型之间是可以转换的
2.1传递多种不同类型的参数:
url:http://localhost/mvc/test/toPerson1.do?name=zhangsan&age=14&address=china&birthday=
* 传递的参数的名字必须要与实体类的属性set方法后面的字符串匹配的上才能接收到参数,首字符的大小写不区分
* 请求中传的参数只要是能和参数列表里面的变量名或者实体里面的set后面的字符串匹配的上就能接收到 a
@RequestMapping("/toPerson1.do")
public String toPerson1(String name, Integer age, String address,
Date birthday) {
System.out.println(name + " " + age + " " + address + " " + birthday);
return "jsp1/index";
* 注册时间类型的属性编辑器,将String转化为Date
@InitBinder
public void initBinder(ServletRequestDataBinder binder) {
binder.registerCustomEditor(Date.class, new CustomDateEditor(
new SimpleDateFormat("yyyy-MM-dd"), true));
输出:zhangsan 14 china Fri Feb 11 00:00:00 CST 2000
2.2传递数组:
url:http://localhost/mvc/test/toPerson2.do?name=tom&name=jack
* 对数组的接收,定义为同名即可
@RequestMapping("/toPerson2.do")
public String toPerson2(String[] name) {
for (String result : name) {
System.out.println(result);
return "jsp1/index";
输出:tom jack
2.3传递自定义对象(可多个):
url:http://localhost/mvc/test/toPerson3.do?name=zhangsan&age=14&address=china&birthday=
User 定义的属性有:name,age,并且有各自属性的对应的set方法以及toString方法
Person定义的属性有:name,age.address,birthday,并且有各自属性的对应的set方法以及toString方法
* 传递的参数的名字必须要与实体类的属性set方法后面的字符串匹配的上才能接收到参数,首字符的大小写不区分
* 请求中传的参数只要是能和参数列表里面的变量名或者实体里面的set后面的字符串匹配的上就能接收到
@RequestMapping("/toPerson3.do")
public String toPerson3(Person person, User user) {
System.out.println(person);
System.out.println(user);
return "jsp1/index";
Person [name=zhangsan, age=14, address=china, birthday=Fri Feb 11 00:00:00 CST 2000]User [name=zhangsan, age=14]
自动封装了对象,并且被分别注入进来!
三、注解形式的结果返回
1. 数据写到页面,方法的返回值采用ModelAndView, new ModelAndView("index", map);,相当于把结果数据放到response里面
url:http://localhost/mvc/test/toPerson41.do
url:http://localhost/mvc/test/toPerson42.do
url:http://localhost/mvc/test/toPerson43.do
url:http://localhost/mvc/test/toPerson44.do
* HttpServletRequest可以直接定义在参数的列表,并且带回返回结果
@RequestMapping("/toPerson41.do")
public String toPerson41(HttpServletRequest request) throws Exception {
request.setAttribute("p", newPesion());
return "index";
* 方法的返回值采用ModelAndView, new ModelAndView("index", map);
* ,相当于把结果数据放到Request里面,不建议使用
@RequestMapping("/toPerson42.do")
public ModelAndView toPerson42() throws Exception {
Map&String, Object& map = new HashMap&String, Object&();
map.put("p", newPesion());
return new ModelAndView("index", map);
* 直接在方法的参数列表中来定义Map,这个Map即使ModelAndView里面的Map,
* 由视图解析器统一处理,统一走ModelAndView的接口,也不建议使用
@RequestMapping("/toPerson43.do")
public String toPerson43(Map&String, Object& map) throws Exception {
map.put("p", newPesion());
return "index";
* 在参数列表中直接定义Model,model.addAttribute("p", person);
* 把参数值放到request类里面去,建议使用
@RequestMapping("/toPerson44.do")
public String toPerson44(Model model) throws Exception {
// 把参数值放到request类里面去
model.addAttribute("p", newPesion());
return "index";
* 为了测试,创建一个Persion对象
public Person newPesion(){
Person person = new Person();
person.setName("james");
person.setAge(29);
person.setAddress("maami");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date date = format.parse("");
person.setBirthday(date);
以上四种方式均能达到相同的效果,但在参数列表中直接定义Model,model.addAttribute("p", person);把参数值放到request类里面去,建议使用
2. Ajax调用springmvc的方法:直接在参数的列表上定义PrintWriter,out.write(result);把结果写到页面,建议使用的
url:http://localhost/mvc/test/toAjax.do
* ajax的请求返回值类型应该是void,参数列表里直接定义HttpServletResponse,
* 获得PrintWriter的类,最后可把结果写到页面 不建议使用
@RequestMapping("/ajax1.do")
public void ajax1(String name, HttpServletResponse response) {
String result = "hello " +
response.getWriter().write(result);
} catch (IOException e) {
e.printStackTrace();
* 直接在参数的列表上定义PrintWriter,out.write(result);
* 把结果写到页面,建议使用的
@RequestMapping("/ajax2.do")
public void ajax2(String name, PrintWriter out) {
String result = "hello " +
out.write(result);
* 转向ajax.jsp页面
@RequestMapping("/toAjax.do")
public String toAjax() {
return "ajax";
ajax页面代码如下:
&script type="text/javascript" src="js/jquery-1.6.2.js"&&/script&
&script type="text/javascript"&
$(function(){
$("#mybutton").click(function(){
url:"test/ajax1.do",
type:"post",
dataType:"text",
name:"zhangsan"
success:function(responseText){
alert(responseText);
error:function(){
alert("system error");
&input id="mybutton" type="button" value="click"&
四、表单提交和重定向
1、表单提交:
请求方式的指定:@RequestMapping( method=RequestMethod.POST )可以指定请求方式,前台页面就必须要以它制定好的方式来访问,否则出现405错误
表单jsp页面:
&base href="&%=basePath%&"&
&title&SpringMVC Form&/title&
&form action="test/toPerson5.do" method="post"&
name:&input name="name" type="text"&&br&
age:&input name="age" type="text"&&br&
address:&input name="address" type="text"&&br&
birthday:&input name="birthday" type="text"&&br&
&input type="submit" value="submit"&&br&
对应方法为:
* 转向form.jsp页面
@RequestMapping("/toform.do")
public String toForm() {
return "form";
* @RequestMapping( method=RequestMethod.POST)
* 可以指定请求方式,前台页面就必须要以它制定好的方式来访问,否则出现405错误 a
@RequestMapping(value = "/toPerson5.do", method = RequestMethod.POST)
public String toPerson5(Person person) {
System.out.println(person);
return "jsp1/index";
2. 重定向:controller内部重定向,redirect:加上同一个controller中的requestMapping的值,controller之间的重定向:必须要指定好controller的命名空间再指定requestMapping的值,redirect:后必须要加/,是从根目录开始
* controller内部重定向
* redirect:加上同一个controller中的requestMapping的值
@RequestMapping("/redirectToForm.do")
public String redirectToForm() {
return "redirect:toform.do";
* controller之间的重定向:必须要指定好controller的命名空间再指定requestMapping的值,
* redirect:后必须要加/,是从根目录开始
@RequestMapping("/redirectToForm1.do")
public String redirectToForm1() {
//test1表示另一个Controller的命名空间
return "redirect:/test1/toForm.do";
参考资料:
浏览 38713
浏览: 88601 次
来自: 小城市
[color=orange][/color][/size]l] ...
写的还好。
与节省内存空间

我要回帖

更多关于 云发卡靠谱吗 的文章

 

随机推荐