File tree 2 files changed +3
-14
lines changed
java/com/vip/saturn/job/console/springboot
2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change 5
5
import org .springframework .boot .web .servlet .FilterRegistrationBean ;
6
6
import org .springframework .context .annotation .Bean ;
7
7
import org .springframework .stereotype .Component ;
8
- import org .springframework .web .filter .CharacterEncodingFilter ;
9
8
10
9
@ Component
11
10
public class SaturnFilterRegister {
12
11
13
12
@ Value ("${authentication.enabled:false}" )
14
13
private boolean authenticationEnabled ;
15
14
16
- @ Bean
17
- public FilterRegistrationBean registerEncodingFilter () {
18
- CharacterEncodingFilter filter = new CharacterEncodingFilter ();
19
- filter .setEncoding ("UTF-8" );
20
- filter .setForceEncoding (true );
21
- FilterRegistrationBean registration = new FilterRegistrationBean (filter );
22
- registration .addUrlPatterns ("/*" );
23
- registration .setOrder (0 );
24
- return registration ;
25
- }
26
-
27
15
@ Bean
28
16
public FilterRegistrationBean registerAuthenticationFilter () {
29
17
AuthenticationFilter filter = new AuthenticationFilter ();
30
18
filter .setEnabled (authenticationEnabled );
31
19
FilterRegistrationBean registration = new FilterRegistrationBean (filter );
32
20
registration .addUrlPatterns ("/console/*" );
33
- registration .setOrder (1 );
21
+ registration .setOrder (0 );
34
22
return registration ;
35
23
}
36
24
37
-
38
25
}
Original file line number Diff line number Diff line change 1
1
# server
2
2
server.port =9088
3
3
4
+ spring.http.encoding.force =true
5
+
4
6
# server.compression.enabled=true
5
7
6
8
# other
You can’t perform that action at this time.
0 commit comments