在使用docker容器时开发应用程序时我没有得到一些东西.
让我说我正在开发一个java应用程序,我设置了一个带有jdk 8基本映像的java容器,我仍然需要在我的本地开发机器上安装java 8 jdk,因为我要使用的IDE将寻找运行时本地计算机上的库而不是docker容器.
这是对的还是我错过了什么?有些事情我可以完全在docker容器上做,比如设置一个数据库,但是我还需要在我的本地开发机器上做一些事情,并尝试将它与我的docker镜像匹配,例如像java或python这样的语言运行库为了使用IDE.
containers docker docker-compose docker-swarm docker-machine
我正在使用Volley连接到MySql数据库.我创建了数据库表并编写了php函数,下面是java代码.所有这一切都在一直工作,但就在昨天它醒来在logcat中发出这个错误并且它没有返回任何响应,使用谷歌chrome postman测试php脚本工作得很好所以我认为我的java代码有问题.
BasicNetwork.performRequest:http://192.168.43.71/database/login.php的意外响应代码403
我知道之前曾经问过这样的几个问题,我已经完成了所有这些问题,似乎没有什么工作可做.我疯了.
private void login() {
StringRequest jsonObjRequest = new StringRequest(Method.POST, Constants.ACCOUNTLOGIN,
loginSuccessListener(),
loginErrorListener()) {
protected Map<String, String> getParams() throws com.android.volley.AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
params.put("user_phone_number", sPhoneNumber);
params.put("user_password", sPassword);
return params;
};
};
mVolleyQueue.add(jsonObjRequest);
}
Run Code Online (Sandbox Code Playgroud) 我试图在api级别10上做通知,下面是我的代码但是我得到语法错误setLatestEventInfo无法解决.我猜它与API级别有关
public static void sendNotification(Context caller, Class<?> activityToLaunch, String title, String msg, int numberOfEvents, boolean sound, boolean flashLed, boolean vibrate, int iconID) {
NotificationManager notifier = (NotificationManager) caller.getSystemService(Context.NOTIFICATION_SERVICE);
final Notification notify = new Notification(iconID, "", System.currentTimeMillis());
notify.icon = iconID;
notify.tickerText = title;
notify.when = System.currentTimeMillis();
notify.number = numberOfEvents;
notify.flags |= Notification.FLAG_AUTO_CANCEL;
if (sound) notify.defaults |= Notification.DEFAULT_SOUND;
if (flashLed) {
// add lights
notify.flags |= Notification.FLAG_SHOW_LIGHTS;
notify.ledARGB = Color.BLUE;
notify.ledOnMS = 500;
notify.ledOffMS = 500;
}
if (vibrate) {
notify.vibrate = …Run Code Online (Sandbox Code Playgroud) 我有一个Spring MVC应用程序,该应用程序将部署在IBM WebSphere Application Server Liberty Profile上,该应用程序应该访问本地托管的mysql数据库服务器。我在sever.xml文件中添加了如下数据源配置
<dataSource id="springdb" jndiName="jdbc/springdb">
<jdbcDriver javax.sql.XADataSource="com.mysql.cj.jdbc.Driver" libraryRef="mysqlJDBCLib"/>
<properties databaseName="spring_db" password="**********" portNumber="3306" serverName="localhost" user="root"/>
</dataSource>
<library id="mysqlJDBCLib">
<fileset dir="/opt/IBM/WebSphere/Liberty_16.0.0.4/usr/shared/resources/mysql" includes="mysql-connector-java-6.0.6.jar"/>
</library>
Run Code Online (Sandbox Code Playgroud)
我正在获得以下堆栈跟踪
Caused by: java.lang.RuntimeException: java.sql.SQLNonTransientException: DSRA4000E: A valid JDBC driver implementation class was not found for the jdbcDriver dataSource[springdb]/jdbcDriver[default-0] using the library mysqlJDBCLib. [/opt/IBM/WebSphere/Liberty_16.0.0.4/usr/shared/resources/mysql/mysql-connector-java-6.0.6.jar]
at com.ibm.ws.resource.internal.ResourceFactoryTrackerData$1.getService(ResourceFactoryTrackerData.java:123)
... 77 more
Caused by: java.sql.SQLNonTransientException: DSRA4000E: A valid JDBC driver implementation class was not found for the jdbcDriver dataSource[springdb]/jdbcDriver[default-0] using the library mysqlJDBCLib. [/opt/IBM/WebSphere/Liberty_16.0.0.4/usr/shared/resources/mysql/mysql-connector-java-6.0.6.jar]
at com.ibm.ws.jdbc.internal.JDBCDriverService.classNotFound(JDBCDriverService.java:196)
... …Run Code Online (Sandbox Code Playgroud) android ×2
containers ×1
docker ×1
docker-swarm ×1
java ×1
jdbc ×1
mysql ×1
php ×1
spring ×1
websphere ×1