- 博客(14)
- 收藏
- 关注
原创 Mybatis search by using a date
Here’s today’s task: the front end only gave me a date parameter with a default time:createTime: “2021-07-11 00:00:00”. What I needed to do was getting rid of the time, use the date as the search parameter to searth this date’s data.So the mybatis can be
2021-07-12 14:45:58 157
原创 Something about @JsonFormat
Firstly I use @JsonFormat to format a date which was selected from the database, like this:@JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")private Date createTime;Then I realized that the return value to the front end is wrong
2021-06-21 17:47:23 92
原创 Fuzzy Search, MySql MAX, GROUP BY and ORDER BY funtion
When you need a fuzzy seach funciton which only shares one search bar:<select id="selectAllProducts" resultMap="ProductResult"> select id, product_no, name, type, unit, brand, remark from product_info where 1=1 <if test="(appSearc
2021-05-31 16:06:59 130
原创 How to Git Reset and push to the remote branch
If I have already push my code to a remote branch, how to reset it into the previous version?Firstly, Git Reset your local branch. I use IDEA’s Git Reset function, Hard mode.Then, use git bash tool to putin “git push --force”. Check the local branch nam
2021-01-05 10:54:30 115
原创 @GeneratedValue(generator = “JDBC“)
If the primary key is self increment, you have to add @GeneratedValue(generator = “JDBC”) on your entity’s field. Otherwise, the primary key can be got if you want to use it again.
2020-11-11 15:36:28 2998 1
原创 IDEA Maven Local Configuration
1 Your local maven directory2 Settings file in your local MAVEN directory, notice: MAVEN directory.3 Your local repository url4 You have to put a SAME settings file into your local repository directory, like this:
2020-09-23 09:45:00 241
原创 Compare The First Chinese Character And Make A Positive Sequence List
If the first character is Chinese, make a positive sequence list and make pages. private String getListInPages(Page<RoomDeviceTypeEntity> page, JSONObject pageObject, List<RoomDeviceTypeEntity> list) { Comparator comparator = Collat
2020-09-21 15:27:47 95
原创 Redisson Jar package Confict
This problem confused me. Even more exprienced coders in my team couldn’t say why. Here is the problem description:I pulled the code into my machine and didn’t change anything and I couldn’t run it locally, however, my co-workers could. So I tracked down
2020-09-16 10:20:43 454
原创 How to not register eureka when starting a module
Put following command into Edit Configuration/VM options:-Deureka.client.register-with-eureka=false
2020-09-14 15:23:00 77
原创 Clone And Set Up Your First Project From GitLab into IDEA
Set Up GitSSH1. Initialize git username and emailThis is the global settinggit config --global user.name "XXX"git config --global user.email "xxx@eeee.com"2. Create SSH$ ssh-keygen -t rsa -C "your_email@163.com"press enter key if you are comfort
2020-09-14 11:53:22 106
原创 How To Remote Debug
sudo java -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5555 -jar ./xxxx.jar >>xxxxx.log
2020-09-11 10:31:01 181
原创 How to avoid Index Out Of Boundary Exeption
1. Use fori iterate, get the index2. current index has to less than list size minus oneFor example:[1,2,3,4,5] size is 5Index (4) is the last element, which is 5So index number has to be less than 4, which is the (size -1) if (deviceInfos.size() -1
2020-09-09 18:09:21 124
原创 Start a jar file under Linux system
1 package and put your jar file onto the server, Xshell with “rz” command would be very simple.by the way, “sz” for download2 jar package starts up and output log filesudo nohup java -jar ./xxxx.jar >xxxxx.log 2>&1 &if you don’t want to w
2020-09-09 17:39:40 88
原创 How To Print MyBatis SQL
How To Print MyBatis SQLSpringBoot properties file shoule be written like this:logging.level.com.test.example.dao = debugmybatis.configuration.log-impl = org.apache.ibatis.logging.stdout.StdOutImplnotice: the second configuration is important! Otherwis
2020-09-09 11:22:47 117
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人