Home > Backend Development > PHP Tutorial > Problems encountered at work in 2015: 11-20

Problems encountered at work in 2015: 11-20

WBOY
Release: 2016-08-08 09:30:54
Original
849 people have browsed it

11. DWZ frame paging problem.

a. The built-in paging is not powerful, and you need to render the main content of the Table yourself.

b. There is only one page, and the IDs of all places that rely on IDs, such as pagination and forms, must be unique.

c. The table style "table" can only be consistent with the default usage method and style of dwz.

If you use class="table", but the table body uses third-party paging, the th of the table header and the td of the table body cannot be aligned.

Taking into account the issues of technical universality and website customization, the DWZ front-end framework was abandoned.

12. The company’s Java project packaging and deployment is written in shell scripts and executed automatically.

I wanted to install and configure Git-Maven under my own cloud server CentOS, but I found that git was already installed.

Maven, I didn’t want to install it.

It feels quite troublesome to package and deploy every time. As far as my personal website is concerned, I am more accustomed to manually copying and deploying.

13. It is often necessary to establish a corresponding Model based on the fields of the database.

Contacting the database and switching back and forth is too inefficient.

Today, I discovered that I can use the copy function of mysql-front to copy all fields directly and then paste them into a java class file.

In this way, you don’t have to keep looking at the structure of the database.

14. Mybatis is configured with two almost identical paging interceptors, and an error will be reported.

< ;/plugin>

//When debugging, I found that the target is the RoutingStatementHandler type, but as long as the type conversion is forced, an error is reported

public Object intercept (Invocation invocation) throws Throwable {

Object target = invocation.getTarget();

RoutingStatementHandler handler = (RoutingStatementHandler) target;

}

15.400 and other error pages.

When server error 500, page not found 404, parameter insufficient 400, etc. occur, the page will be ugly if Tomcat and other servers do not process it.

For example:

HTTP ERROR 400

Problem accessing /user-center/tender/tenderManual.json. Reason:

Required Long parameter 'tenderAmount' is not present

It is also very unsafe. Tell others directly. Actual parameter names and types.

However, if you use Tomcat to intercept 400 and jump to a certain page, the style of the page will be difficult to be the same as under normal circumstances.

Normally, there is navigation and menu.

We expect that when 400 appears, it will have the same appearance as the normal page, but the content will be different and the content will be "Content not found".

16. While helping the Boss with a problem, I discovered a new way to switch directories.

Generally use cd C:/

or cd /D e:/

to switch directories. Today I saw the "D:" used directly by Boss and switched to the D drive.

I thought it would be easy to switch disks, but I found that D:/xiaolei failed.

17. Tomcat encountered a problem while restarting.

~/tomcat7/bin/shutdown.sh

~/tomcat7/bin/startup.sh

There is a problem with the above restart script.

There is no problem with shutdown to close tomcat, and there is no problem with startup.

But because closing takes a certain amount of time, when the project is more complex.

Before the shutdown is completed, it starts up. Although the console shows that the startup is successful, it cannot be accessed normally.

Today, another method suddenly occurred to me.

Receive the return value of shutdown.sh, return success, and then execute startup.sh.

18.HTTP protocol abbreviation.

Previous writing method

On the Bootstrap Chinese website, I saw usage similar to the following:

Netizen explanation:

If the browser is currently using the https protocol, then load the script of the https protocol, otherwise use http, which ensures that all resources on the page use the same protocol.

In fact, some people practice it as a norm. In addition, including image addresses and background addresses in CSS, the protocol name can be omitted.

There is no compatibility problem when using it on the script tag, but there will be problems under IE when writing this on the link or @import.

19. When I was using the carousel plug-in unslider, I found that there was some blank space on the left side of the image.

Specifically for the carousel plug-in, 2 pictures are displayed on one screen, and only a small part of the second picture is displayed.

The reason may be that the picture should occupy 100%, but there seems to be a blank space on the left side, so I had to fill it with the second picture.

Just add the following css.

* {

margin: 0;

padding: 0;

-webkit-font-smoothing: antialiased;

-webkit-box-sizing: border-box;

-moz-box-sizing: border-box;

box-sizing: border-box;

}

20. Website monitoring issues.

When Nginx is not used, external requests are directly responded to by Tomcat. If Tomcat hangs, Alibaba Cloud Monitoring will automatically alarm because http://FansUnion.cn cannot respond.

However, since Nginx is configured, Tomcat hangs up and no alarm is issued, because the outside world obtains the request response through Nginx, and the response is

502 Bad Gateway

nginx/1.6.2

At this time, the HTTP request returns status is 502.

Need to modify the monitoring configuration.

The above introduces the problems encountered at work in 2015: 11-20, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template