- 博客(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
233
原创 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
162
原创 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
222
原创 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
230
原创 @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
3204
1
原创 IDEA Maven Local Configuration
1 Your local maven directory 2 Settings file in your local MAVEN directory, notice: MAVEN directory. 3 Your local repository url 4 You have to put a SAME settings file into your local repository directory, like this:
2020-09-23 09:45:00
325
原创 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
202
原创 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
540
原创 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
145
原创 Clone And Set Up Your First Project From GitLab into IDEA
Set Up GitSSH 1. Initialize git username and email This is the global setting git 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
177
原创 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
275
原创 How to avoid Index Out Of Boundary Exeption
1. Use fori iterate, get the index 2. current index has to less than list size minus one For example: [1,2,3,4,5] size is 5 Index (4) is the last element, which is 5 So index number has to be less than 4, which is the (size -1) if (deviceInfos.size() -1
2020-09-09 18:09:21
187
原创 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 download 2 jar package starts up and output log file sudo nohup java -jar ./xxxx.jar >xxxxx.log 2>&1 & if you don’t want to w
2020-09-09 17:39:40
148
原创 How To Print MyBatis SQL
How To Print MyBatis SQL SpringBoot properties file shoule be written like this: logging.level.com.test.example.dao = debug mybatis.configuration.log-impl = org.apache.ibatis.logging.stdout.StdOutImpl notice: the second configuration is important! Otherwis
2020-09-09 11:22:47
183
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅