Here are the steps i followed in order to work UTF8 functionality in API Manager 1.4.0.
01. Create API manager database using scripts found in API Manager distribution.
02. Change master-datasources.xml to point new API manager database.
Configuration is shown below
03. Run alter database and table commands as follows. 01. Create API manager database using scripts found in API Manager distribution.
02. Change master-datasources.xml to point new API manager database.
Configuration is shown below
<url>jdbc:mysql://localhost:3306/database_name?relaxAutoCommit=true&characterEncoding=UTF-8</url> <username>root</username> <password>root</password> <driverClassName>com.mysql.jdbc.Driver</driverClassName> <maxActive>50</maxActive> <maxWait>60000</maxWait> <testOnBorrow>true</testOnBorrow> <validationQuery>SELECT 1</validationQuery> <validationInterval>30000</validationInterval>
ALTER DATABASE database_name CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE database_name_table_names CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
04. Run following command to check changes. All field values should contain utf8_unicode_ci, utf8_general_ci or desired type.
show variables like 'collation%';
05. add following to /etc/mysql/my.cnf and restart MySQL server.
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
Also followed below instructions.
validated that there was a character set filter in
updated
included -Dfile.encoding=UTF-8 in
06. Start API manager and perform following actions.
create API with Japanese string. API stored in API manager database and registry properly.
create Application with Japanese name(application name persisted to database without issue).
create subscription and generate keys. Invoke APIs.
Here i have attached screen-shots for store and publisher and how data stored in database. After applying those configurations i was able to perform API manager operations as expected.
No comments:
Post a Comment