diff --git a/application/jaxrs-mysql-quarkus/src/main/java/webapp/tier/service/MysqlService.java b/application/jaxrs-mysql-quarkus/src/main/java/webapp/tier/service/MysqlService.java index 8083a2fe8..8db50dc52 100644 --- a/application/jaxrs-mysql-quarkus/src/main/java/webapp/tier/service/MysqlService.java +++ b/application/jaxrs-mysql-quarkus/src/main/java/webapp/tier/service/MysqlService.java @@ -43,12 +43,6 @@ public class MysqlService implements Database { @ConfigProperty(name = "mysql.delete.msg") String deletesql; - @ConfigProperty(name = "mysql.id") - String sqlkey; - - @ConfigProperty(name = "mysql.body") - String sqlbody; - private final Logger logger = Logger.getLogger(this.getClass().getSimpleName()); public boolean connectionStatus() { @@ -64,8 +58,8 @@ public boolean connectionStatus() { @Override public MsgBean insertMsg() throws SQLException, NoSuchAlgorithmException { MsgBean msgbean = new MsgBean(CreateId.createid(), message, "Insert"); - String sql = insertsql.replace(sqlkey, MsgUtils.intToString(msgbean.getId())) - .replace(sqlbody, msgbean.getMessage()); + String sql = insertsql.replace("msgid", MsgUtils.intToString(msgbean.getId())) + .replace("msgbody", msgbean.getMessage()); try (Connection con = ds.getConnection(); Statement stmt = con.createStatement()) { diff --git a/application/jaxrs-mysql-quarkus/src/main/resources/application.properties b/application/jaxrs-mysql-quarkus/src/main/resources/application.properties index a31ed931c..20313d3c2 100644 --- a/application/jaxrs-mysql-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-mysql-quarkus/src/main/resources/application.properties @@ -30,9 +30,6 @@ quarkus.hibernate-orm.dialect=org.hibernate.dialect.MySQLDialect mysql.insert.msg=INSERT INTO msg (id, msg) VALUES (msgid, 'msgbody') mysql.select.msg=SELECT * FROM msg mysql.delete.msg=DELETE FROM msg -mysql.id=msgid -mysql.body=msgbody -mysql.msg.quarkus=throuth quarkus # cache quarkus.cache.caffeine."mysql_select_msg".expire-after-write=1S