springmvc对@initBindler标签的运用

@InitBinder标签注解运用与标识方法,其对WebDataBinder对象进行初始化,其WebDataBinder是DataBinder的一个子类,其用于在前端传来的参数进行javaBean属性的绑定。 其注意:运用@InitBinder绑定的方法1.不能有返回值,因为该方法只是对数据绑定中,做些处理,这里可以做些对pojo对象中Date类的数据格式的转化等。或做一些数据不进行映射等等业务情况。但对数据进行格式转变,可以直接使用@DateFormate标签,但使用时一定需要在配置文件中加
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

登录系统

因为前两天写IO的学生管理系统,导致我想模仿着写一个登录系统。 因为暂时没有学到页面部分,所以想象着登录页面开始写。 该页面包括:用户注册、登录;管理员登录(管理员账号密码已固定)然后就是管理员能够进行的增删查改操作 package com.java1; //定义用户信息类 public class LoginUser { private String username; private String password; public LoginUser() { } public
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

以TCP/UDP协议为基础编写的登录系统

以TCP/UDP协议为基础编写的登录系统 最近自学到网络编程部分,因此结合之前的数据流以及曾经写过的登录系统进行改进 package com.java; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Soc
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

总结最近学习成果03-输入一个数,将其前后颠倒

输入一个数,将他前后颠倒并输出 //是直接改变这个数,然后输出 并不是倒叙输出 /*思路分析:定义计数器c 默认为0 c的值由上一个c*10加上n取余10 拿到的值 然后将n/10 取整 使得数字往前移 */ printf("输入一个数"); int n; scanf("%d", &n); int c = 0; while (n){
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

总结最近学习成果04-斐波那契数列

斐波那契数列打印 1,2,3,5,8,13…求第N个的数值 void Fibonacci(int n){ int f1 = 0; int f2 = 1; for (int i = 0; i <= n-1; i++){ f2 = f2 + f1; f1 = f2 - f1; } printf("%d", f2); } //递归 void Fibonacci(int n){ .
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

总结最近学习成果07-亮灯问题

.亮着电灯的盏数,电灯1 <= n <= 65535 全关着 n个学生,第一个学生1的倍数的灯拉一下,第二个学生2的倍数的灯拉一下… 最终亮灯情况 /* 思路:n个学生n个灯 通过不同的学生点亮再熄灭重复 最后剩下来点亮的灯 就是那些有平方生成的数 因为第9位置的灯能够被1 3 9 灯亮 熄灭 点亮 3*3 最后只有一个 形成了奇数个约数 所以统计有多少个这样位置上的数字就可以知道 最后有多少灯是亮的 */ int n = 0;
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

总结最近学习成果09-日期的计算题

1)根据距离2000-1-1的天数,算出日期 2)计算自己活了多少天 3)题目:输入某年某月某日,判断这一天是这一年的第几天? 吐槽:题目不难,但是真的很烦人 /* 思路:首先抽象出两个函数 判断某年是不是闰年,通过得到年月日计算这是本年的第几天 第一问:起始年是2000年 首先看拿到的日期days是不是大于366 年份加一 然后日期数days-366 通过判断是不是闰年的函数控制减量s是365还是366 直到days不大于s这样就把年数算完了 也拿到了还剩下的d
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

Intellij IDEA 个人设置

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Zen99T/article/details/88984041 1 Appearance & Behavior 1.1 Appearance Theme(Darcula);(勾选 )Override default fonts by;选择 Microsoft YaHei UI 字体;Size(15)。 Show memory indicator(打开内存使用状态) Disable mnemonic
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

Linux_Index

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Zen99T/article/details/88983769 安装 VMware Ubuntu安装详细过程 调整vmware上ubuntu桌面的显示尺寸 1 Linux命令 Linux/Unix 命令ls -l显示文件信息 Linux之top命令解析 使用ssh公钥实现免密码登录 Linux命令思维导图 每天一个linux命令目录 2 工具使用 2.1 xshell XShell连接mac和ub
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

LeetCode-restore-ip-addresses

Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given"25525511135", return["255.255.11.135", "255.255.111.35"]. (Order does not matter) import java.util.ArrayList; public cl
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

LeetCode-decode-ways

A message containing letters fromA-Zis being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine the total number of ways to decode it. For example, Given encoded me
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

LeetCode- merge-sorted-array

Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space to hold additional elements from B. The number of elements initialized in A and B are m and nrespectively. public class Soluti
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

LeetCode-partition-list

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of the two partitions. For example, Given1->4->3->2->5
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

LeetCode-remove-duplicates-from-sorted-list-ii

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given1->2->3->3->4->4->5, return1->2->5. Given1->1->1->2->3, return2->3. /** * Definition for singly-linke
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

LeetCode-search-in-rotated-sorted-array-ii

Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target is in the array. public class Solution { public boolean search(i
分类: 其他 发布时间: 04-05 22:20 阅读次数: 0

springboot与mybatis的集成

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012442381/article/details/89048028 springboot与mybatis的集成 环境准备: IntelliJ IDEA Maven 搭建步骤 第一步:在pom中添加springboot与mybatis的jar: 第二步:在application.properties中添加配置: 第三步:写代码: 代码还是按照controller、service、dao来进行的,
分类: 编程语言 发布时间: 04-05 22:20 阅读次数: 0

springmvc返回json数据等应用

springmvc返回数据给前端使用@ResponseBody注解,其底层是实现的流程是在controller和请求报文中有一层,HttpMessageConverter<T>将接收客户端HttpInputMessage,进行数据的映射,并将java对象传递给controller。而Controller端将java对象传给HttpMessageConverter<T>将其转化为一定格式的HttpOutputMessage将其转给响应报文 其可以使用@RequestBody还可通过直接返回Res
分类: 编程语言 发布时间: 04-05 22:20 阅读次数: 0

总结最近学习成果11-求1000以内的素数

求1000以内的素数 /* 一千个数一个一个判断 如果一个数比他小的所有数都无法整除它 那么它就是素数 */ for (int i = 2; i <= 1000; i++){ int flag = 1; for (int j = 2; j < i; j++){ if (i%j == 0){ flag = 0;
分类: 编程语言 发布时间: 04-05 22:20 阅读次数: 0

Java代理示例

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Zen99T/article/details/89048093 1 接口及其实现 public interface Greeting { void sayHello(String name); } --------------------------------------------- public class GreetingImpl implements Greeting {
分类: 编程语言 发布时间: 04-05 22:20 阅读次数: 0

总结最近学习成果12-数组打乱顺序

有序数组打乱顺序 //种随机数种子,每次随机位置和i位置交换 void print(int* arr){ srand(time(0)); int t; for (int i = 0; i < 10; i++){ int s = rand() % 10; t = arr[i]; arr[i] = arr[s]; arr[s] = t; } f
分类: 编程语言 发布时间: 04-05 22:20 阅读次数: 0