Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
ARSnova Backend
Commits
d3211f7c
Commit
d3211f7c
authored
7 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Improve charset header handling for plain text
parent
4d50fada
1 merge request
!68
Migration to Ektorp and refactoring of the database layer
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/config/AppConfig.java
+3
-0
3 additions, 0 deletions
src/main/java/de/thm/arsnova/config/AppConfig.java
with
3 additions
and
0 deletions
src/main/java/de/thm/arsnova/config/AppConfig.java
+
3
−
0
View file @
d3211f7c
...
...
@@ -67,6 +67,7 @@ import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
;
import
org.springframework.web.servlet.view.InternalResourceViewResolver
;
import
java.nio.charset.Charset
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -174,6 +175,8 @@ public class AppConfig extends WebMvcConfigurerAdapter {
@Bean
public
StringHttpMessageConverter
stringMessageConverter
()
{
StringHttpMessageConverter
messageConverter
=
new
StringHttpMessageConverter
();
messageConverter
.
setDefaultCharset
(
Charset
.
forName
(
"UTF-8"
));
messageConverter
.
setWriteAcceptCharset
(
false
);
List
<
MediaType
>
mediaTypes
=
new
ArrayList
<>();
mediaTypes
.
add
(
MediaType
.
TEXT_PLAIN
);
messageConverter
.
setSupportedMediaTypes
(
mediaTypes
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment